Elmah sends error message on development server, but not in production

I am trying to configure Elmah to send me an email when a new error occurs. This works fine on my development server, but no email is sent on the production server. The exception is written to the production server, it is just an email that is not sent.

Here are the 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 tried different mail servers, both local and remote, and I tried both synchronous and asynchronous mail sending, but to no avail.

Now I have no idea how to proceed (other than debugging Elmah on my production server, which seems to take a lot of effort to set up). Please, help!

Thanks,

Adrian

Edit: I can also add that I tried to turn off the firewall on the production server, but that didn't matter either.

+4
source share
1 answer

It sounds like a textbook port blocking somewhere on the firewall (local or isp level)

try connecting to smtp from production window using telnet command line

instructions are here: http://www.yuki-onna.co.uk/email/smtp.html

if you cannot connect using the method described above with port 587, then the firewall problem is DEFINED - if we canโ€™t continue to think, but does your serverโ€™s application error log show any failure in sending the message?

+1
source

Source: https://habr.com/ru/post/1312314/


All Articles