Search code examples
c#smtpumbracowindows-server-2016

Merchello Notification throwing this error: No connection could be made because the target machine actively refused it


I've been getting this exception when Merchello tries to send an email notification:

No connection could be made because the target machine actively refused it

I am using send grid and I've tried the exact same credentials that I was using on Local and it works fine locally.

I'm sure it's something to do with the server, what I've tried so far:

  • Made sure SMTP service is running on the server
  • Opened the port 587 in the firewall
  • Temporally disabled the firewall
  • Tried a different SMTP provider
  • Added this to the web config:

     <system.net>
       <defaultProxy> 
         <proxy usesystemdefault="False"/> 
       </defaultProxy>
      </system.net>
    

More form the stack trace:

 System.Net.WebException: Unable to connect to the remote server ---> 
 System.Net.Sockets.SocketException: No connection could be made because the 
 target machine actively refused it

Any ideas? Thanks


Solution

  • I changed the port to 25 and it worked, not sure why I was asked to use 587.