473,406 Members | 2,707 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,406 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 2424
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.