Peter's Gekko

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Using localhost as mailserver (5.7.1 Unable to relay for xxx)

With .NET 2.0 writing code which uses the IIS webserver to send mail has become even more powerful. The System.Net.Mail namespace has some rich classes.

private static void SendMailWithIIS(string subject, string body, string to)

{

    MailMessage message = new MailMessage();

    message.From =  new MailAddress("Me@Spammer.net");

    message.To.Add(to);

    message.Subject = subject;

    message.Body = body;

    message.BodyEncoding = System.Text.Encoding.ASCII;

    message.IsBodyHtml = true;

    message.Priority = MailPriority.Normal;

 

    SmtpClient smtp = new SmtpClient("Localhost");

    smtp.Send(message);

}

The .NET docs even contain a sample to send mail asynchronous. The hard part lies not in the code but in the configuration of localhost. It considers itself being used as a mail relay and by default it does not allow anyone to do that. In your code you'll get the error message : Mailbox unavailable. The server response was: 5.7.1 Unable to relay for

To fix it you have to configure relay restrictions in the IIS admin.

Relay

Here I've set localhost, aka 127.0.0.1, as the only one allowed to relay mail. And now my .NET code can spam everybody. Use with care !


Posted Wed, Apr 5 2006 5:41 AM by pvanooijen
Filed under: ,

[Advertisement]

Comments

Dennis van der Stelt wrote Smart usage of localhost as mailserver
on Wed, Apr 5 2006 9:38 AM
Some things are so simple, you'd expect everyone to know these things and use them wisely. Unfortunatly,...
Peter's Gekko wrote Developers vs. (?) ITpro's. SMTP and a website
on Fri, Apr 7 2006 6:03 AM
In a recent post I described how easy it was to turn your website into a spamming tool provided you know...
Sam wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Apr 11 2006 4:56 PM
Thanks man...you r the one who help me to solve this problem, Microsfot development is SUCKS....always changes ..Never give what the hell we need to change ..its really Fting..

Keep posting good stuff


pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Apr 12 2006 4:34 AM
Thanks Sam. But I'm not saying it's bad. It is indeed changing, from totally insecure to better secured.

What is bad is the miscommunication, which keeps us developers searching and searching
http://codebetter.com/blogs/peter.van.ooijen/archive/2006/04/07/142484.aspx
aderogba wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Apr 13 2006 11:55 AM
Thank you so much.
ihsan wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Apr 14 2006 9:22 AM
thanks peter..

iis configuration that i wasn't find..
Agnes wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Apr 21 2006 9:28 AM
I have done all the steps in asp.net and  configured relay restrictions in the IIS admin but i still cant send sms.I still get the error 550 5.7.1 Pls help
schooltje wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Apr 24 2006 1:04 PM
I have also done all the steps (just like "Agnes") but the message 'Mailbox unavailable. The server response was: 5.7.1 Unable to relay for 'emailadres' is coming. Does somebody have a solution?
pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Apr 24 2006 4:26 PM
Agnes en schooltje:
Is smtp on IIS really started ?
Did you fill in the right computer/IP addres ? Try starting with "all except"
schooltje wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Apr 25 2006 5:39 PM
Is smtp on IIS really started ? --> Yes

Did you fill in the right computer/IP addres ? --> Yes

Try starting with "all except" --> I have changed the radio button from 'only the list below' to 'all except the list below' and then the local SMTP server works. Why and How i don't know, but it works now:) Thnx
fash wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Apr 26 2006 9:33 AM
Hi,
I have gone through and followed all the steps in here but do not see why I can not send emails. When debugging, it passes the line which is
' Send mail
       mailClient.Send(mailMessage)
but no email is being sent ??
Thanks
pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Apr 28 2006 4:00 AM
Looks like the mail server has accepted the message. To find out what happened to it you should check the mail server's logs and the like. Your code has done its best.
Peter's Gekko wrote Setting up a simple internet server (pt3) Accept incoming traffic (Sometimes default is not secure enough)
on Tue, Jun 6 2006 7:47 AM
In two previous post I described my first steps in setting up my own internet server.

Part 1 described...
Ross wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Aug 7 2006 11:07 AM
You are a lifesaver.
Dan wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Aug 21 2006 11:03 PM
I get the same error message.
I'm using my local machine running XP Pro and localhost within Visual Web Developer to test an ASP.NET 2.0 application to see if I can run the asp:PasswordRecovery control.  So I don't have IIS installed on my local PC.  Is there any way I can get around this for my local testing.
Surjit wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Aug 24 2006 5:37 AM
Thanx peter...
Ciro wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Aug 25 2006 2:25 AM

Thanx ;-)

PKaur wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Aug 28 2006 11:40 AM

I configured my SMTP settings and I dont receive any error message. But the mail is not being sent. What should I do about it?

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Sep 4 2006 3:29 AM

@Dan,

you need IIS. That's your mailserver. Cassini (vs 2005 webserver) doesn't have one.

@PKaur,

check you IIS log. That should tell you what went wrong.

Latte wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Oct 26 2006 10:32 AM

Hi,

i copy and paste all your codes and edit a little.

protected void Button1_Click1(object sender, EventArgs e)

   {

       MailMessage message = new MailMessage();

       message.From = new MailAddress("Me@Spammer.net");

       message.To.Add("testing123@hotmail.com");

       message.Subject = "Hello";

       message.Body = "Hi there!";

       message.BodyEncoding = System.Text.Encoding.ASCII;

       message.IsBodyHtml = true;

       message.Priority = MailPriority.Normal;

       SmtpClient smtp = new SmtpClient("Localhost");

       smtp.Send(message);

   }

I realised i can only send mail when

1) The checkbox "Allow all computer which successfully auth.. .. " is checked.

2)message.From = new MailAddress("Me@Spammer.net");

 i can only use "Me@Spammer.net" and not other e-mail address .

 If i use other e-mail,No e-mail will be send.

please guide me..

thanks in advance

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Oct 28 2006 2:08 PM

Hard to say.

- Does localhost map to 127.0.0.1 ?

- Is there no other restriction set elsewhere ? In the firewall?

What puzzles me is that only the fake email address works. Doe sthe name you use map to an existing user ? In the latter case it points to "something else" fiddling with the permissions on your machine.

Latte wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Oct 28 2006 9:43 PM

Actually I doing project in my school and under school network ,i cannot even send out the mail .. (Perhaps my school block it or smth. . )

I was actually keep changing the IP in the relay . . from 127.0.0.1 to my own ip address..

i got two things to clarify..

Under the Delivery tab(of SMTP option) i click on advance..

Under domain should i type in localhost or the domain(properties of my computer, computer name tab,the domain stated there ? ) of my computer?

One last thing is this statement,

SmtpClient smtp = new SmtpClient("Localhost");

do i need to change the content of "Localhost" to my ip such as  "192.168.0.3"?

or just leave it as "localhost" ?

Sorry if u find my questions annoying as i just started with c# project this semester ,that's why a lot of things i dont really understand . .

Have a nice day !

Latte wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Oct 28 2006 11:08 PM

Oh ya, where can i find IIS log?

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Oct 30 2006 1:52 AM

You bet school has blocked ending mail. They don't want to be blacklisted as a spam source :)

Concerning your questions. As they get much broader than the scop of this post: may I suggest the MSDN docs. You'll get a much broader view there and learn a lot lot more then from my comments.

Enjoy your course, B#!

Latte wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Oct 30 2006 9:17 AM

Thanks anyway =)

u are nice

jaic wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Nov 1 2006 8:00 AM

This information  was verymuch useful it solved my problem

Shaan wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Nov 28 2006 11:51 PM

The Solution for the Error "Mailbox unavailable. The server response was: 5.7.1 Unable to relay for (name)  "  is working  Thanks a lot......

PavelK wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Dec 18 2006 5:42 AM

As for so many: It solved my problem. Thanks a lot ...

abdu wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Jan 3 2007 2:45 AM

I have done all the things listed above, but it is still not working .i got same error

Galina wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jan 4 2007 3:54 PM

Thanks, just what I need to fix the problem.

Ueslei wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Jan 17 2007 10:34 AM

Hi!

I receive the following message:

THE E-MAIL ADDRESS USED TO SEND MESSAGES IS NOT THE SAME AS THE ADDRESS THAT YOU AUTHENTICATED WITH (#5.7.1)

When sending message. My from address is a no-reply@mydomain.com.br (does not exists on the server).

Does anyone knows how to help me figure out this ??

Ueslei

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jan 18 2007 2:37 AM

This requires some fiddling with permissions. Beyond my working knowledge. Googling around with your error message does provide usefull hints.

JReal wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Jan 29 2007 3:31 AM

Thank you

shaikh wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jan 30 2007 2:16 AM

what can do to remove 5.7.1 error message box.......

help.....................................................

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jan 30 2007 2:25 AM

Prevent it appearing ? As described above. And if when it apperas click OK ?

kalubhai wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sun, Feb 4 2007 10:29 PM

i have above code and i have complete send mail soccesfully but not recieve mail.

Ashrafali wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Feb 15 2007 3:38 AM

Thankyou very much.

This information  was verymuch useful it solved my problem.

Once more thankyou

I finally got this to work too wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Feb 28 2007 4:19 PM

But I tried setting the relay restrictions as described and it wouldn't work with 127.0.0.1  and the option Only the list below.  When I changed it to the option All except the list below it deleted the 127.0.0.1 from the computer list so there is nothing there now and it works fine.  The other option on the Relay Restrictions page for Allow All computer ... at the bottom is unchecked too.

Matthias wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Mar 2 2007 3:39 AM

First of all.. thanks a lot the fix helped me as well, but I have another problem. I don't receive the mail although I was told that the mail was succesfully send.

2nd question .. I'm going to export my project from localhost to a real life asp.net server. Is this going to work on that server to with "localhost" as server describtion or do I have to change it to the server's IP Address?

Thanks a lot..

Regard Matthias

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Mar 2 2007 6:55 AM

I can't analyze your mail traffic from a distance ..

Localhost is just an alias for the 127,0,0,1 ip address. When the entry is in the lmhost file of the server it will work. Else not.

Tony Taylor wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Mar 5 2007 7:49 AM

Hi

In trying to send a simple MailMessage under the SmtpClient, I get

Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Vers

ion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I've Googled and read the MSDN docs about the SmtpPermission class (which says the SmtpClient class demands an SmtpPermission - what does that mean?), but no luck.

Any ideas?

Thanks

vijay wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Apr 5 2007 12:09 AM

Saved me some grief

Jay wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Apr 10 2007 11:47 PM

Thanks! Just what I was looking for...

Pushpa kumr.M wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Apr 19 2007 3:13 AM

Hai it's very good  this is programs is working in my local machine but how to develop in my real product server.

Jobi K John wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Apr 23 2007 9:00 AM

In trying to send a simple MailMessage, I get

Mailbox unavailable. The server response was: 5.7.1 Unable to relay for <xxx>

What will be the problem?

Jobi K John wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Apr 23 2007 9:04 AM

Is it possible to send smtp mail through proxy server?

Doug Seelinger wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, May 12 2007 1:08 AM

Why isn't this more plainly stated in the documentation.  I understand that the "old way" in 1.1 wasn't as secure, but this little how-to should have been in the MS docs - or if it is, easier to find.

divya wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, May 25 2007 5:49 AM

Hi,This is not what i was looking for// what i needed is,

If i click on a link button say "Contac Us" a window for outlook should open up with the email address i specify in the code.

Can u help

Venkat wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, May 30 2007 11:38 AM

My mails are always dumped in the "Queue" folder, which means my SMTP is working fine.

But thereon the mails are never sent to the intended recipients.

Please help.

Mauricio wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, May 31 2007 9:06 PM

Thanks Master, I'm done

ammiraju wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jun 26 2007 5:47 AM

Hey  your code helped our team a lot thank you

Jimbo wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Jul 4 2007 4:32 PM

Hi

I've followed all the instructions right at the top of this page.  The emails appear to get sent (i.e. my code doesn't break) however the emails aren't received by the recipient I specify (the recipient happens to be me for testing purposes).

Here's the code that executes succesfully:

SmtpClient theClient = new SmtpClient("localhost");

theClient.Send(message);

The emails aren't within any of the sub folders of C:\Inetpub\mailroot.

Any ideas where they are?

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jul 5 2007 5:33 AM

That's beyond the scope of this code. Looks like there is a problem with receiving emails. Does the email-box accept mail from other senders ?

shalini wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jul 10 2007 4:08 PM

Thank you, that worked for me.

shalini wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jul 10 2007 4:09 PM

that worked for me, Thank you.

Amal chacko wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jul 26 2007 1:46 AM

In trying to send a simple MailMessage, I get

Mailbox unavailable. The server response was: 5.7.1 Unable to relay for <xxx>

What will be the problem?

Monica Rossetti wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Aug 21 2007 6:14 PM

This was the only straighforward explanation and solution to the "unable to relay" error. Thanks a lot

James wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Aug 23 2007 3:40 PM

Have anybody tried to send emails to an internet email account, such as gmail or hotmail?

I am able to send emails to domain accounts but not with internet email accounts.

Thanks,

Satu wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Sep 10 2007 8:49 PM

My error was this

CDO.Object didnt found. check if your configuration allow smtp.

it highlight the error at mailClient.Send(mailMessage)

did i got confuguration error ?

Teju wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Sep 12 2007 4:45 AM

Hello,

I am using the simple code to send emails but I am getting the  Mailbox unavailable error.

As per your instructions  i tried to configure the IIS.

I have a setting under IIS which is set to allunassigned IP . If this is the case how can i set to asp.net to send emails.

Any help will be much apprceiated.

Regards,

Teju

Linga Reddy Sama wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Oct 19 2007 6:48 AM

I have configured Default SMTP as you told above,but iam getting Exception as Mailbox unavailable. The server response was: 5.7.1 Unable to relay for sama.lingareddy@gmail.com

here sama.lingareddy@gmail.com this is from address

Linga Reddy Sama wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Oct 19 2007 6:50 AM

My code is this,but iam getting Exception as Mailbox unavailable. The server response was: 5.7.1 Unable to relay for sama.lingareddy@gmail.com,iam trying to send an email from the Default SMTP server,Suggest me.

Private Sub SendMailWithIIS()

       Dim Message As New MailMessage

       Message.From = New MailAddress("sama.lingareddy@gmail.com")

       Message.To.Add("sama.lingareddy@gmail.com")

       Message.Subject = "OmSaiRam"

       Message.Body = "Om sairam"

       Message.BodyEncoding = System.Text.Encoding.ASCII

       Message.IsBodyHtml = True

       Message.Priority = MailPriority.Normal

       Dim smtp As New SmtpClient("Localhost")

       smtp.Send(Message)

   End Sub

Jame wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Oct 27 2007 4:52 AM

but now i want to send to yahoomail but how to send to yahoo mail please hepl me?

JimmyMac wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sun, Dec 16 2007 12:05 PM

Thanks alot, I've been looking for this solution for months.

JiommyMac

Lapetra wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Dec 29 2007 3:06 PM

"And now my .NET code can spam everybody. Use with care !"

It's not that I need to send spams but not sure how it is a spam method.

Email details will show a real IP address anyway.

Nathan Li’s Blog » Blog Archive » Mailbox unavailable. The server response was: 5.7.1 Unable to relay for x@x.com wrote Nathan Li&#8217;s Blog &raquo; Blog Archive &raquo; Mailbox unavailable. The server response was: 5.7.1 Unable to relay for x@x.com
on Sat, Jan 26 2008 2:21 AM

Pingback from  Nathan Li&#8217;s Blog  &raquo; Blog Archive   &raquo; Mailbox unavailable. The server response was: 5.7.1 Unable to relay for x@x.com

Bula wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jan 31 2008 1:39 PM

Thanks!

saro wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Feb 14 2008 5:45 PM

thanks a lot man, greate job.

brajesh tiwari wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Feb 16 2008 12:12 AM

i have written the code below but it simply redirect the mail to  C:\Inetpub\mailroot\Queue rather then sending to  the person i want can some one help me

MailMessage message = new MailMessage();

       message.From = new MailAddress("Me@Spammer.net");

       message.To.Add("tiw_20062000@yahoo.com");

       message.Subject = "gfgdfg gdf gdfg dgf gdg bvc bcv b";

       message.Body = "cvx xcv xvx vc cvx v vcx xc v vx x ";

       message.BodyEncoding = System.Text.Encoding.ASCII;

       message.IsBodyHtml = true;

       message.Priority = MailPriority.Normal;

       SmtpClient smtp = new SmtpClient("192.168.10.79",26);

       smtp.Send(message);

brajesh tiwari wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Feb 16 2008 12:17 AM

the code below simply redirect to C:\Inetpub\mailroot\Queue and doesn't send to the person i want

{

  MailMessage message = new MailMessage();

  message.From = new MailAddress("Me@Spammer.net");

  message.To.Add("tiw_20062000@yahoo.com");

   message.Subject = "gfgdfg gdf gdfg dgf gdg bvc bcv b";

    message.Body = "cvx xcv xvx vc cvx v vcx xc v vx x ";

    message.BodyEncoding = System.Text.Encoding.ASCII;

     message.IsBodyHtml = true;

      message.Priority = MailPriority.Normal;

      SmtpClient smtp = new SmtpClient("192.168.10.79",26);

      smtp.Send(message);

}

vineeth babu wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Feb 27 2008 10:59 AM

thanks its working that is it dosent get an error but the mail is not received please send another option

Anthony wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Mar 4 2008 11:25 AM

THANK YOU!  This was a huge help for such a small issue!

Kishore wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Mar 11 2008 11:59 AM

Thanks for your tip. It really helped me.

Shelon Padmore wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Apr 26 2008 10:53 AM

Interesting solution,

- Shelon Padmore

JP Estrada wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, May 7 2008 12:20 AM

I'm having the same problem as Brajesh.. my mails are stuck in the queue folder.. how do i fix this?

Raina wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, May 10 2008 3:43 AM

I have tried with the above code, but still i'm getting error like Message Sending Failure. We r using GoDaddy server. what is the solution

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, May 13 2008 3:44 AM

@ Brajesh and all others having problems with the quueue of their server:

This code posts the mail messag eto the queue. After that it's in the hands of the mailserver and out of the scope of this post.

Contact your sysadmin to get it fixed.

abcd wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Jun 25 2008 2:42 AM

hey but the mail is not delivering..... Is there be any firewall problem.... how to overcome that?

Ryan J. wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Jun 27 2008 11:16 AM

Thank you so much... now I can develop and test on my dev box and it still works for our production server.  What a pain!!!!!

velmurugan wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Aug 7 2008 1:35 AM

thanks for ur notes.

its nice to work from localhost.

thanks once again.

shariff wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Sep 26 2008 5:48 AM

thanks the information was very helpfull!!

Allwin wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Nov 12 2008 4:17 AM

Thank you very much, your Blog really helped me

Techkie wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sun, Nov 23 2008 1:39 AM

Thank you so much Peter!! It's the best.

tesfa wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Dec 10 2008 7:54 AM

I've been having this problem for days, and evently switched to using the pickup directory...that too was a headache.

But now I found your post and it work...thanks a BILLION

Ken Palmer wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jan 8 2009 10:46 AM

Thanks Peter. That helped a ton.

Toyin Fatuga wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Jan 12 2009 8:24 AM

Thank Men! I am short of Word

Toyin Fatuga wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Jan 12 2009 8:29 AM

Thanks, Mr. Peter. But, what can I do to prevent the mail be send to SPAM folder in Yahoo mail, instead of INBOX.

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Tue, Jan 13 2009 3:48 AM

There's notthing you can do about that, it's up to Yahoo where in which folder they will delever the message. Do something about the senders address or the message content to convince their spam-filter ?

sant wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Jan 15 2009 4:55 PM

u r really helped me. THNX

Receive mail from local host using SMTP | keyongtech wrote Receive mail from local host using SMTP | keyongtech
on Thu, Jan 22 2009 1:01 AM

Pingback from  Receive mail from local host using SMTP | keyongtech

Johan wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Thu, Mar 12 2009 9:32 AM

Thanks!

Tay Leong Wei wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Mar 16 2009 7:55 AM

Thanks for your solution. And it's really helped me.

I only can get the email in C:\Inetpub\mailroot\Queue.

Is there any idea , we can send the email to yahoo account ?

MyZonal.com wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Mar 20 2009 6:44 AM

Thanks..its working but can we send mails from our smtp server without authentication or Credentials...?

Thanks

http://www.myzonal.com

hewa wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sat, Apr 11 2009 9:28 AM

Its working Thanks but the mails are not received do you why so.please help me.

Christopher Union wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Wed, Jun 3 2009 11:18 AM

Thanks!  That REALLY helped!  I never would've thought to check IIS!

DreamBig wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Sun, Sep 27 2009 8:52 AM

I m getting this error: Mailbox unavailable. The server response was: 5.7.1 Message rejected as spam by Content Filtering.

did as told int the post..but still the error comes?

anyhelp...

pvanooijen wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Sep 28 2009 2:43 AM

Your error message is clear. Isn't it ?

Agaran Sankar wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Fri, Dec 11 2009 7:38 AM

Thank you so much for this valuable post.  u had done a great Job.

please Continue posting.

Nandri

Xebeche wrote re: Using localhost as mailserver (5.7.1 Unable to relay for xxx)
on Mon, Dec 14 2009 3:03 PM

To all who have stucked mails in C:\Inetpub\mailroot\Queue.

The probable reason is that your ISP blocks port 25. You have to set up your ISP's SMTP server as Smarthost in your SMTP Virtual Server properties (tab Delivery -> Advanced)

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us