Send mail error

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
 
M

MS News \(MS ILM\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top