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

ShankeyRank #972 · 2.1K reputationPosted Jan 30, 2011, 10:03 PM EST
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
Mag9 reputationPosted Jan 31, 2011, 1:25 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Jan 31, 2011, 8:25 AM EST