473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Send mail error

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 Pa*********@aol.com"
error. here is the code:
Dim msgMail As New MailMessage

msgMail.To = "Pa*********@aol.com"

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
Nov 17 '05 #1
2 2419
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.


"Patrick Hill" <Pr********@nospam.aol.com> wrote in message
news:ep*************@TK2MSFTNGP12.phx.gbl...
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 Pa*********@aol.com" error. here is the code:
Dim msgMail As New MailMessage

msgMail.To = "Pa*********@aol.com"

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

Nov 17 '05 #2
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.


"Patrick Hill" <Pr********@nospam.aol.com> wrote in message
news:ep*************@TK2MSFTNGP12.phx.gbl...
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 Pa*********@aol.com" error. here is the code:
Dim msgMail As New MailMessage

msgMail.To = "Pa*********@aol.com"

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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jam | last post by:
Dear All, I am writing a console and it send a email out when it hits error it calls this static void SendErrorEmail(string error) { System.Web.Mail.MailMessage mail = new...
1
by: michi | last post by:
Hi there.... Got here a tricky thing with my SMTP. First I show you what works on my machine.. **This Works** SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail provider...
0
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To =...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
4
by: Tony M | last post by:
VS 2005 - XP media - VB .net - winforms - .net 2.0 Just trying to send an email, here is the code and the error message that I get. I can't figure out how to fix it?
5
by: pat | last post by:
Hi, i'am using an ac2K progrom which sends automaticle emails with an attachment. Since last week , a error occurs with number 2293. Our mail program is Outlook 2003. It's probably a matter...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.