• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 904
  • Last Modified:

CDONTS authentication

Set myCDONTSMail = CreateObject("CDONTS.NewMail")

is there anyway to specify authentication using this object? smtp server name / usr and pass?
0
alain123
Asked:
alain123
  • 5
  • 3
1 Solution
 
brgivensCommented:
No, but all you need to do is allow relaying for localhost

IIS -> Expand [Server Name] -> Right-Click on Default SMTP Virtual Server -> Properties -> Access -> Relay -> Add -> 127.0.0.1 -> OK
0
 
alain123Author Commented:
hello,

trust me, i have tried everything you can possibly imagine regarding smtp config and haven't been able to solve it ( i have a wireless router attached to the server).. so i was looking for another slution
0
 
brgivensCommented:
CDONTS doesn't support authentication.  Did you try the solution I suggested?  The wireless router shouldn't make a difference, you just have to allow relaying for the IP address of the machine where the ASP files are located.  Unless the ASP files are on a different box than IIS, the IP address will be 127.0.0.1
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
alain123Author Commented:
yes i did tried your suggestion, emails are sitting on the emailroot queue folder, they don't go anywhere
0
 
alain123Author Commented:
0
 
alain123Author Commented:
0
 
alain123Author Commented:
thank you.. i have check all that, nothing, still doesn't work
0
 
ap_sajithCommented:
IF you are using Win2k or above, You can use CDOSYS.. Which is much more flexible and efficient than CDONTS. Here's some sample code on how to configure SMTP server and the server authentication code.

<%
Dim objMsg
Dim objConfig

Set objMsg    = CreateObject("CDO.Message")
Set objConfig = CreateObject("CDO.Configuration")


Dim objFields
Set objFields = objConfig.Fields

' Setup server information
objFields("http://schemas.microsoft.com/cdo/configuration/smtpserver")       = "mysmtpserver.com"
objFields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")   = 25
objFields("http://schemas.microsoft.com/cdo/configuration/sendusing")        = 2

' Setup server login information if your server require it
objFields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objFields("http://schemas.microsoft.com/cdo/configuration/sendusername")     = "SMTPAUTHUser"
objFields("http://schemas.microsoft.com/cdo/configuration/sendpassword")     = "SMTPAUTHPassword"

objFields.Update

' Now you can setup message to send
Set objMsg.Configuration = objConfig
objMsg.To       = "tosomeone@somewhere.com"
objMsg.From     = "fromme@withlove.com"
objMsg.Subject  = "Hello"
objMsg.TextBody = "This is my test mail from CDOSYS"

objMsg.Send
%>

Hope this helps..

Cheers!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now