Search This Blog

Wednesday, January 02, 2008

Configuration of SMTP Server using CDO.Message

We can set the settings of SMTP Server as given below:

Mail.SmtpMail.SmtpServer = "Give ur SMTP Server port if u have " or else give 127.0.0.4 or SMTPOut.SecureServer.Net

newMail.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

newMail.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

newMail.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ur Smtp user name"

newMail.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "ur SMTP Server Password"


Note: For testing in ur Local System u can set the Outlook Email Id as ur userName and Outlook Password as ur Password for sendusername and sendpassword

Hope this answered ur question..

No comments: