|
-
Mar 17th, 2005, 12:48 PM
#1
Thread Starter
Fanatic Member
System.Web.Mail.MailMessage
Guys,
I am using this to send mail via my app. I am seeing this error when trying to run the code below ?
Could not access 'CDO.message' object
Could anybody help with this ?
Bob
Code:
Public Sub sendintemail()
Dim email As New System.Web.Mail.MailMessage
email.To = "[email protected]"
email.From = "Static Bob"
email.Body = "MessageText"
email.Subject = CurrentContract.ContractName
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "10.25.2.24"
System.Web.Mail.SmtpMail.Send(email)
End Sub
-
Mar 17th, 2005, 01:22 PM
#2
Re: System.Web.Mail.MailMessage
When you lanch the
System.Web.Mail.SmtpMail.Send(email)
do it in a
Try ... Catch
like this
VB Code:
Try
System.Web.Mail.SmtpMail.Send(email)
Catch Ex As Exception
MessageBox.Show(ex.Message)
' Take a look at Ex.InnerException
End Try
And when the error occur, take a look in the ex.InnerException in the debuger
you will find the exact error message ...
-
Mar 17th, 2005, 09:01 PM
#3
Re: System.Web.Mail.MailMessage
you will find a solution to your problem on http://www.systemwebmail.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|