R
Robert
I am trying to send an email message from the code behind
page of an aspx page.
Here is what I have:
=======================================
Imports System.Web.Mail
Private Sub EmailStuff()
Dim oMsg As MailMessage = New MailMessage
TRY
oMsg.From = "(e-mail address removed)"
oMsg.To = "(e-mail address removed)"
oMsg.Subject = "My Subject"
oMsg.Body = "This is the body of the email message"
SmtpMail.SmtpServer = "mySMTPServer"
SmtpMail.Send(oMsg) ' ERROR OCCURRS ON THIS LINE
CATCH Exc As Exception
msgbox Exc.Message
END TRY
End Sub
=======================================
Exc.Message returns this error message:
"Could not access 'CDO.Message' object"
This is from Visual Studio .NET 2003 running on Windows
XP PRO. Is this a permissions issue? Is there something
I need to setup as far as SMTP on this machine. The SMTP
service is running.
page of an aspx page.
Here is what I have:
=======================================
Imports System.Web.Mail
Private Sub EmailStuff()
Dim oMsg As MailMessage = New MailMessage
TRY
oMsg.From = "(e-mail address removed)"
oMsg.To = "(e-mail address removed)"
oMsg.Subject = "My Subject"
oMsg.Body = "This is the body of the email message"
SmtpMail.SmtpServer = "mySMTPServer"
SmtpMail.Send(oMsg) ' ERROR OCCURRS ON THIS LINE
CATCH Exc As Exception
msgbox Exc.Message
END TRY
End Sub
=======================================
Exc.Message returns this error message:
"Could not access 'CDO.Message' object"
This is from Visual Studio .NET 2003 running on Windows
XP PRO. Is this a permissions issue? Is there something
I need to setup as far as SMTP on this machine. The SMTP
service is running.