System.Web.Mail FAQ

Complete FAQ Listing

4.3.5 Not a gateway or local host. Printer Friendly   Email This FAQ   Discuss

This is a relay error. Make sure you can relay through the SmtpMail.SmtpServer either by your IP address, by your MailMessage.From address, or if you need to authenticate, check out 3.8 How do I authenticate to send an email?
If SmtpMail.SmtpServer is set to "" or "localhost", and you are using the built in IIS SMTP Service, you can allow relaying for by
  • Opening the IIS Admin MMC
  • Right-Clicking on the SMTP Virtual Server and selecting Properties
  • On the Access tab, click the Relay button
  • Grant (or the IP address used by System.Web.Mail) to the Computers list.
  • Close all dialogs
  • Restarting the SMTP Service


Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
New Post
  • mail in    [ Reply ]
    • RE: mail in    [ Reply ]
  • bounceback    [ Reply ]
  •    [ Reply ]
  • Not a gateway error    [ Reply ]
  • mail sent but not delivered    [ Reply ]