Smtp settings don't seem to work

Topics: Troubleshooting, Writing modules
Apr 22, 2013 at 3:47 PM
Edited Apr 22, 2013 at 3:51 PM
I have installed the Orchard.Module.Orchard.Email-1.6 package.

That gives me the smtp settings.

The host of the website has given me the required config details. I have saved those settings in the dashboard, including the port number (8889) and the host (mail.mydomain.com or the IP address, I have tried both).

I have checked the Orchard_Email_SmtpSettingsPartRecord table in the database, and the settings have been stored correctly.

However, I am still getting the following error:

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

This is bizarre, because I have set a port number, 8889, that is different to 25, and I have set the host to NOT be the localhost. Like I say, I have checked the database to see what is in there and it is all correct.

Questions:
  1. What am I doing wrong?!
  2. Is there a way to manually put these settings into the web.config? Eg, just use the relevant section of the web config:
<system.net>
<mailSettings>
  <smtp deliveryMethod="Network" from="admin@mydomain.com">
    <network host="mail.mydomain.com" password="password" userName="user"/>
  </smtp>
</mailSettings>
</system.net>

Would that work?
Apr 22, 2013 at 11:02 PM
Doesn't sound like a problem with Orchard, more a problem with the server not listening for that port request.
Apr 23, 2013 at 6:58 AM
Yes, a combination of that and me using an old class library with a hard coded host... My aplologies.