CDONTS authentication

Set myCDONTSMail = CreateObject("CDONTS.NewMail")

is there anyway to specify authentication using this object? smtp server name / usr and pass?
Who is Participating?
ap_sajithConnect With a Mentor Commented:
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("")       = ""
objFields("")   = 25
objFields("")        = 2

' Setup server login information if your server require it
objFields("") = 1
objFields("")     = "SMTPAUTHUser"
objFields("")     = "SMTPAUTHPassword"


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


Hope this helps..

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 -> -> OK
alain123Author Commented:

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
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

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
alain123Author Commented:
yes i did tried your suggestion, emails are sitting on the emailroot queue folder, they don't go anywhere
alain123Author Commented:
alain123Author Commented:
alain123Author Commented:
thank you.. i have check all that, nothing, still doesn't work
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.