-
June 22nd, 2007, 08:00 AM
#1
how do solve this error for sending mail in vb.net?
i am using vb.net 2003.i am doing my project in vb.net windows application.the following code is for sending mail.
Code:
Dim mymailmessage As New MailMessage
Try
Dim bSuccess As Boolean = True
mymailmessage.From = FromTextBox.Text
mymailmessage.To = "kumar@indocanapparel.com"
mymailmessage.Bcc = sb.ToString
mymailmessage.Subject = SubjectTextBox.Text
mymailmessage.Body = MessageTextBox.Text
mymailmessage.BodyFormat = MailFormat.Text
mymailmessage.Priority = MailPriority.Normal
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mymailmessage)
DisplayLabel.Text = "Your Mail was Successfully Sent"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
the above code,i written in vb.net windows application.
i run the project,then i click send button means,the following error is display.
"Could not access 'CDO.Message' object"
how to solve this?plz help.
Last edited by HanneSThEGreaT; June 23rd, 2007 at 04:52 AM.
Reason: Added [CODE] [/CODE] Tags!
-
June 23rd, 2007, 10:27 PM
#2
Re: how do solve this error for sending mail in vb.net?
This could be several reasons... google is your friend here:
http://www.google.com/search?q=Could...Message+object
You can also try using your computers local address instead of the loopback address 127.0.0.1. I've had this create problems in the past.
Good Luck,
Craig - CRG IT Solutions - Microsoft Gold Partner
-My posts after 08/2015 = .NET 4.x and Visual Studio 2015
-My posts after 11/2011 = .NET 4.x and Visual Studio 2012
-My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
-My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
-My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
-My posts before 04/2007 = .NET 1.1/2.0
*I do not follow all threads, so if you have a secondary question, message me.
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
|