Send mail error

  • Thread starter Thread starter Patrick Hill
  • Start date Start date
P

Patrick Hill

Hello,
I have a web form that is a email page. When the user fills out the form and
clicks send there is a "The server rejected one or more recipient addresses.
The server response was: 550 5.7.1 Unable to relay for (e-mail address removed)"
error. here is the code:
Dim msgMail As New MailMessage

msgMail.To = "(e-mail address removed)"

msgMail.From = TextBox1.Text

msgMail.Subject = TextBox2.Text

msgMail.Body = TextBox3.Text

'SmtpMail.Send(msgMail.From.ToString, msgMail.To.ToString,
msgMail.Subject.ToString, msgMail.Body.ToString)

SmtpMail.SmtpServer="daMachine"

SmtpMail.Send(msgMail)



Now my SMTP server is the Virtual SMTP server that comes with iis is that
the problem? Do I have to set anything else up in IIS? What do I have to
do to get this puppy to work? Thanks
 
you can setting the value of smtpserver to "" this works as well or
"localhost"
Also make sure that your SMTP server is forwarding to your ISP SMTP Server

If you open the Internet Services Manager
(the IIS admin app) and view the properties
of the SMTP Server, Click on the Delivery tab, then the advanced
button, fill in the hostname of your mail
router/SMTP server in the "Smart Host" field.
like
smtp.yourISPmailServer.com
or
mail.yourISPmailServer.com
or
mail.yoursmtpserver.com
or
IP address
or what ever.

or directly set your SmtpServer = "mail.yoursmptserveratyourisp.com"
try different ways.
 
Back
Top