I have the following Code in a Windows App (reference to System.Web.dll)
Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
Dim smtpmail As System.Web.Mail.SmtpMail
smtpmail.SmtpServer = "129.41.70.10"
'strOrderInfo = BuildBody()
Message.To = "ed****@beavex.com"
Message.From = "te**@beavex.com"
Message.Body = "Testing"
Message.Subject = "Hope This Works"
Try
smtpmail.Send(Message)
Catch ex As Exception
Dim s As String = ex.Message
End Try
It works fine in a Windows App. In My ConsoleApp, I'm catching an error
_message "Could not access 'CDO.Message' object." String
Any help here. The code is the exact same.
Ed