Tuesday 4 March 2014

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

Working on SharePoint 2013, running some custom code, which was trying to send an email through a shared SMTP server (virtual SMTP on IIS 6 as IIS7 doesn't supports it as far as I know, it's something I still need to look at so don't take my words on "it doesn't work on IIS7"), I received this error,

 Mailbox unavailable. The server response was: 5.7.1 Unable to relay for me@myCompany.com

Sending an email code was working on another server in the farm but not on mine, so a bit of googling find me this solution,


 1) Go to Server where you or your Network Administrator setup virtual SMTP server

 2) Go to Administrative Tools and click on IIS 6.0 Manager

 3) Right click "SMTP Virtual Server"

 4) Select Access tab

 5) Click on "Relay" in section Relay Restrictions

 6) Add 127.0.0.1 if not already in list(for me it was there)and then your server IP address to the list

 7) Click "OK" and job Done.


 I have followed these steps on a development machine and it made the code work for me perfectly, try these steps on Production server on your own risk ;).

No comments:

Post a Comment