G
Guest
I am trying to send an e-mail using one of the examples I got on this group
as follows: (both toemail and myemail are valid e-mail addreses.
'System.Web.Mail' (requires reference to "System.Web.dll"),
''' delcare a new mail message
Dim aMailMessage As New System.Web.Mail.MailMessage
''' set the from address
aMailMessage.From = myemail
''' set the to address and subject
aMailMessage.To = toemail
aMailMessage.Subject = "Test Sending E-Mail from VB."
''' send in Text format
aMailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
''' set the body text
aMailMessage.Body = "This is the text of the email message from
my test Program."
''' add an attachment if you want to
'aMailMessage.Attachments.Add(New
System.Web.Mail.MailAttachment("C:Test.txt",
System.Web.Mail.MailEncoding.Base64))
''' send the email
System.Web.Mail.SmtpMail.SmtpServer = "smtp.sbcglobal.net"
System.Web.Mail.SmtpMail.Send(aMailMessage)
I get an error message stating "Could not access CDO.Message Object. Anyone
know what I'm doing wrong, My e-mail is via RoadRunner Internet connection.
as follows: (both toemail and myemail are valid e-mail addreses.
'System.Web.Mail' (requires reference to "System.Web.dll"),
''' delcare a new mail message
Dim aMailMessage As New System.Web.Mail.MailMessage
''' set the from address
aMailMessage.From = myemail
''' set the to address and subject
aMailMessage.To = toemail
aMailMessage.Subject = "Test Sending E-Mail from VB."
''' send in Text format
aMailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
''' set the body text
aMailMessage.Body = "This is the text of the email message from
my test Program."
''' add an attachment if you want to
'aMailMessage.Attachments.Add(New
System.Web.Mail.MailAttachment("C:Test.txt",
System.Web.Mail.MailEncoding.Base64))
''' send the email
System.Web.Mail.SmtpMail.SmtpServer = "smtp.sbcglobal.net"
System.Web.Mail.SmtpMail.Send(aMailMessage)
I get an error message stating "Could not access CDO.Message Object. Anyone
know what I'm doing wrong, My e-mail is via RoadRunner Internet connection.