Could not access 'CDO.Message'
Posted by Bill Williams, Last modified by on 19 August 2006 01:08 PM
If you are getting "Could not access 'CDO.Message' Object when trying to send email using ASP.NET (System.Web.Mail)! Please see below to solve this problem?

Our mail servers require authentication to send emails throught.
In order to send emails use the following code:'------------------

oMsg.From = ""

oMsg.To = ""

oMsg.Subject = "subject here"

oMsg.BodyFormat = Web.Mail.MailFormat.Html

oMsg.Body = "Body here"

Dim oMsg As New Web.Mail.MailMessage'---authentication

oMsg.Fields("") = "ip or"

'or localhost

oMsg.Fields("") = 25

oMsg.Fields("") = 2

oMsg.Fields("") = 1

'whether you use authentication on the server

oMsg.Fields("") = "youremail-in-the-same-server"

oMsg.Fields("") = "pass-of-that-email"

oMsg.Fields("") = 60


Web.Mail.SmtpMail.SmtpServer = "ip or"

'or localhost


(455 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).