Reputation: 33318
I am trying to set up Elmah so that it sends me an e-mail when a new error occurs. This works fine on my development server, but on the production server no e-mail is sent. The exception is logged on the production server, it's just the e-mail that does not get sent.
Here are my elmah configuration settings:
<elmah>
<security allowRemoteAccess="yes"/>
<errorMail
from="<MYGOOGLELOGIN>@googlemail.com"
to="<MYGOOGLELOGIN>@googlemail.com"
subject="ERROR From Elmah"
async="false"
smtpPort="587"
useSsl="true"
smtpServer="smtp.gmail.com"
userName="<MYGOOGLELOGIN>@googlemail.com"
password="<MYGOOGLEPASSWORD>" />
</elmah>
I've tried different mail servers, both local and remote, and I tried both synchronous and asynchronous mail sending but to no avail.
Now I don't have the slightest idea how to proceed (apart from debugging Elmah on my production server, which seems like a lot of effort to set up). Please help!
Thanks,
Adrian
Edit: I might also add that I tried switching off the firewall on the production server, but that did not make any difference either.
Upvotes: 4
Views: 986
Reputation: 6518
This sounds like a text book port blocking on a firewall somewhere (local or isp level)
try connecting to the smtp from the production box using command line telnet
instructions are here: http://www.yuki-onna.co.uk/email/smtp.html
if you can't connect using the above method with port 587, then it is DEFINITELY a firewall issue - if not we can keep thinking, but does your servers application error log shown any failure from the message send?
Upvotes: 1