473,487 Members | 2,622 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can't SendMail

Tom
Using Visual Web Developer 05 Express and this code:
using System.Web.Mail;

MailMessage mail = new MailMessage();
mail.BodyFormat = MailFormat.Html;

mail.To = txtEmailAddress.Text;

mail.From = "tgaughan@nuNO__SPAMmail.org";

mail.Subject = "Test";

string strBody = @"Test Body";

mail.Body = strBody;

SmtpMail.SmtpServer = "localhost";

SmtpMail.Send(mail);

The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for tgaughan@nuNO__SPAMmail.org

Thanks in advance...


Nov 24 '07 #1
3 975
You need to check your relay restrictions, probably add the IP.

Go to IIS and Right Click on SMTP Virtual Server then select Properties.

Click the Access tab.

Under "Relay Restrictions" add the IP Address of the server you are running
the code from.

Regards,

Brian K. Williams

"Tom" <to*********@excursiontech.comwrote in message
news:OJ**************@TK2MSFTNGP06.phx.gbl...
Using Visual Web Developer 05 Express and this code:
using System.Web.Mail;

MailMessage mail = new MailMessage();
mail.BodyFormat = MailFormat.Html;

mail.To = txtEmailAddress.Text;

mail.From = "tgaughan@nuNO__SPAMmail.org";

mail.Subject = "Test";

string strBody = @"Test Body";

mail.Body = strBody;

SmtpMail.SmtpServer = "localhost";

SmtpMail.Send(mail);

The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for tgaughan@nuNO__SPAMmail.org

Thanks in advance...


Nov 24 '07 #2
"Tom" <to*********@excursiontech.comwrote in message
news:OJ**************@TK2MSFTNGP06.phx.gbl...
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for tgaughan@nuNO__SPAMmail.org
Several possible causes / solutions:
http://www.google.co.uk/search?sourc...+550+5%2e7%2e1
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 24 '07 #3
The "Message is the answer" man. "tgaughan@nuNO__SPAMmail.org" is a fake
email. Supply your real one and the server will find it and relay the mail.
Ain't rocket science!
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"Tom" wrote:
Using Visual Web Developer 05 Express and this code:
using System.Web.Mail;

MailMessage mail = new MailMessage();
mail.BodyFormat = MailFormat.Html;

mail.To = txtEmailAddress.Text;

mail.From = "tgaughan@nuNO__SPAMmail.org";

mail.Subject = "Test";

string strBody = @"Test Body";

mail.Body = strBody;

SmtpMail.SmtpServer = "localhost";

SmtpMail.Send(mail);

The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for tgaughan@nuNO__SPAMmail.org

Thanks in advance...


Nov 24 '07 #4

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

Similar topics

7
12950
by: Adams-Blake Co. | last post by:
This may be OT a bit, so maybe someone can point me in the right direction. I want to test a script that sends out an e-mail. I want to test it locally on my Mandrake Linux 8.2 box. It runs OK...
2
5623
by: Sam Hou | last post by:
Dear all, I don't know where my problem is. Hopefully someone can give me some hint to explore the problem more. I am running Apache 2.0.48 wih PHP 4.3.4. The apache is running as nobody. I...
0
2146
by: Aaron Powell | last post by:
I am writing a program for a study I am doing where I must contact several different organisations stored in a database I compiled, but I need to send each email one at a time so they don't know...
4
4003
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
2
6337
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
0
921
by: news | last post by:
n...@absamail.co.za wrote: > Using a script:-- > lynx -dump '<URL1>' > Fl1 > .... > lynx -dump '<URLn>' > Fln > .... > where the URLs are filled in off line, is a great online-telco-cost >...
6
4835
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
8574
by: IamtheEvster | last post by:
I'm working with a LAMP platform - PHP 5.1.4, MySQL 5.0.21, RedHat Enterprise 4... Running Sendmail 8.x. I'm using the PHP mail() function to send some confirmation emails out when a user...
11
26409
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
0
2455
by: s2rinivasan | last post by:
I am srinivasan I sent a last message hoe to trouble shoot httpd passwd acces problum. In that I didn't menson that OS=RedHat LINUX EL4-2.6.9-5. This question also in the same version. In...
0
6967
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
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
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
5442
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 project—planning, coding, testing,...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.