I have the following code for SMTP mail program
Dim Message As New System.Web.Mail.MailMessage
Message.To = "ga*****@yahoo.com"
Message.From = "ga*****@mycompany.net"
Message.Body = "Test message text"
Message.Subject = "A Test"
System.Web.Mail.SmtpMail.SmtpServer = "mail.mycompany.net"
System.Web.Mail.SmtpMail.Send(Message)
if the To part is to an external address like Message.To = ga*****@yahoo.com
then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To =
ga*****@mycompany.net then the code works.
It looks like System.Web.Mail.SmtpMail.SmtpServer is looking for the
recipient SMTP instead of the server.
Am I missing something. Any direction is appreciated it.