IIS 5 & IIS 6
Mailbox unavailable. The server response was: 5.7.1 Unable to relay f...
Last post Sep 29, 2010 02:44 AM by paul6151
Oct 29, 2006 06:12 AM|Swati Jain|LINK
I have configured the smtp server still i got following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for (email message)
what could be the different reasons?
//create the mail message
MailMessage mail =
//set the addresses
mail.From = new MailAddress("email@example.com");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is a sample body";
//send the message
SmtpClient smtp =
Oct 29, 2006 07:38 PM|steve schofield|LINK
Windows Server MVP - IIS
Log archival solution
Install, Configure, Forget
Oct 31, 2006 06:04 AM|qbernard|LINK
Before reaching the smtp filter of yahoo, etc. I think this error msgs indicating your local smtp server is not allowing relay by default. so you must enable relay for that domain or authenticate to the local smtp first.
XCON: How to Set Up Windows 2000 as a SMTP Relay Server or Smart Host
Nov 04, 2006 01:52 AM|mhickson|LINK
In addition to the excellent advice already offered, I can't recommend enough (if you haven't done so already) that you turn on full logging on the SMTP server.
Open up the SMTP server through the IIS management console, and make sure logging is enabled and that everything is showing.
After that, run the code again and examine the results.
This has saved me numerous headaches, and it provides loads of information for followup search engine queries, etc.
Nov 04, 2006 02:12 AM|steve schofield|LINK
Dec 31, 2007 05:34 PM|ramannanda9|LINK
the thing was that in delivery->advanced tab ->attempt to send direct delivery ...... and perform reverse lookup ...... was not checked after checking that it worked .
i was worried like hell b'cos i had already visited 100's of sites and configured relay but the problem lied here........ . hope this helps
Aug 27, 2008 09:15 AM|Bhavesh Suthar|LINK
Guys, You can check this url and let me know what is the solution of that error message?
I have used this script/code for sending emails:
<SCRIPT LANGUAGE="vb" runat="server">
Sub Page_Load(Source as Object,E as EventArgs)
if not(isPostBack) then
Dim mailer as new SmtpClient("Server")
Dim message as new MailMessage()
message.From = new MailAddress("FromEmailID")
message.Subject = "SUBJECT"
message.Body = "<b>BODY</b>"
message.IsBodyHtml = True
Aug 27, 2008 10:31 AM|steve schofield|LINK
Make sure to enable logging locally and see what the entire message is causing it.
You are unable to relay, most likely the IIS SMTP service hasn't been configured to relay localhost messages.
IIS 6 Manager > SMTP Server Virtual Server > Properties > Access > Relay tab. Add 127.0.0.1 and retest.
Apr 24, 2009 09:10 AM|sathiyarayan|LINK
thanks for ur valuable guidence. by ur hint.. i sent the mail successfully but i didn't receive it in the inbox.. why?
Apr 24, 2009 01:23 PM|tomkmvp|LINK
Apr 24, 2009 02:04 PM|sathiyarayan|LINK
Apr 24, 2009 02:40 PM|tomkmvp|LINK
My guess is yahoo caught it in its spam filters.
Nov 25, 2009 11:12 AM|charyforIIS|LINK
thanks it is working for me
Nov 28, 2009 02:35 PM|sathiyarayan|LINK
Sep 29, 2010 02:44 AM|paul6151|LINK