Could not access 'CDO.Message' object.

  • Thread starter Rob R. Ainscough
  • Start date
R

Rob R. Ainscough

I'm using MailMessage class from System.Web.Mail

My code works fine when I specify an SMTP mail server (i.e.
mail.speakeasy.net), but when I change that to another SMTP mail server that
requires authentication I get the above error message. There doesn't appear
to be any support in the MailMessage class that works with authentication??
Am I screwed? Any work arounds? Any alternates? The policy of the SMTP
mail server by hosting company is such that Authentication is REQUIRED so
there is no chance I can get that changed on the Mail Server.

Dim ConfirmationMessage As New MailMessage
With ConfirmationMessage

.To = _Customer.EMail
.Cc = Site.FacilityEMail
.From = Site.EMailServerConfirmationAddy
.Subject = Site.SiteName
.Priority = MailPriority.Normal

.Body = "Welcome Message"

End With

Try

SmtpMail.SmtpServer = Site.EMailServer
SmtpMail.Send(ConfirmationMessage)

Catch ex As Exception

' Show Error

End Try


Any suggestions, Rob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,226
Latest member
KristanTal

Latest Threads

Top