Problem
I am attempting to send email using the localhost mail server in IIS. However I receive the following error message:
Exception type: SmtpFailedRecipientException
Exception message: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for tod@kahunaworld.com
Solution
I received this error on my local staging server, so I had access to the server via Remote Desktop. I am not sure how "secure" this solution is, so use at your own risk.
- Open IIS.
- Right click on "Default SMTP Virtual Server" and select "Properties".
- Select the "Access" tab and click on the "Relay" button. This opens the Relay Restrictions window.
- Select the "All except the list below" radio button.
- Remove all items from the "list below".
- Check the checkbox for "Allow all computers which successfully authenticate...".
- Click OK.
- Click on the "Authentication" button. This should open the Authentication window.
- Make sure that only "Anonymous access" is checked.
- Click OK.
- Click OK again.
That should do it.