Hi,
I am got the following code to send a email to the customers visit our site.
But it is not working giving a error as " System.Web.HttpException: The server rejected one or more recipient addresses".
Please help me for the betterment of the code asasp.
Dim objEmail As New MailMessage
objEmail.From = "[email protected]"
objEmail.To = "[email protected]"
objEmail.Cc = "[email protected]"
objEmail.Subject = "On Line Booking"
objEmail.Body = str
objEmail.Priority = MailPriority.High
Try
SmtpMail.SmtpServer = "mail.smtpserverexample.com"
SmtpMail.Send(objEmail)
lbl_statusmessage.Text = "Thank you for submitting your interest!
Our representative will contact you shortly."
Catch exc As Exception
Response.Write("Mail Sending failure: " + exc.ToString())
End Try
Thanks
Maheshwaran
Loading
Suthish NairPosted Jan 31, 2011, 1:25 PM
MagPosted Jan 31, 2011, 6:25 AM
ShankeyPosted Jan 31, 2011, 3:03 AM
This happens because your SmtpMail.SmtpServer is rejecting addresses.
Check following things
- All email addresses specified at MailMessage.To,
MailMessage.Cc, MailMessage.Bcc and MailMessage.From are valid email
addresses.
-
The MailMessage.From has permissions to relay through the server.
- You have permissions to relay through the server.
check some troubleshooting tip given at below linkhttp://www.systemwebmail.com/faq/4.3.11.aspx