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 "127.0.0.1" or "localhost", and you are using the built in IIS SMTP Service, you can allow relaying for 127.0.0.1 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 127.0.0.1 (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 asp.net    [ Reply ]
    • RE: mail in asp.net    [ Reply ]
  • bounceback    [ Reply ]
  • 127.0.0.1    [ Reply ]
  • Not a gateway error    [ Reply ]
  • mail sent but not delivered    [ Reply ]