Could not access CDO.Message

G

Guest

Hi,

I am getting an exception thrown when i am trying to send mail using the
following code

Dim msg As MailMessage = New MailMessage()

msg.From = Forum + " <" + (e-mail address removed) + ">"

msg.To = TestUser+ " <" + (e-mail address removed) + ">"

msg.Subject = subject

If html Then

msg.BodyFormat = MailFormat.Html

Else

msg.BodyFormat = MailFormat.Text

End If

msg.Body = emailBodyMessage + emailBodyAppendMessage

SmtpMail.SmtpServer = mail.developer-source.co.uk

Try

SmtpMail.Send(msg)

Catch ex As Exception

Return False

End Try

I have iis installed and the SMTP server service is running, the smtp server
specified is setup as an alias on the local smtp server in iis.

Could anyone tell me why this error is occurring and any possible
resolutions to resolve this error

Thanks in advance
Neil Stevens
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top