Search code examples
asp.netemailsmtpmvcmailer

ASP.NET MvcMailer error


When sending mail from localhost, all works without problems

error occurs after publishing site on server

enter image description here **

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 8.8.246.37:25

**

Has anyone had a similar problem?


Solution

  • Your outgoing SMTP connection may be blocked by a firewall. It is a standard outgoing spam prevention measure.

    Do you get SMTP greeting message using telnet (command line program)?

    telnet 8.8.246.37 25
    

    If you can not contact port 25 then try port 587.

    telnet 8.8.246.37 587