PDA

View Full Version : Elmah works for error handling, but won't send email


Sire
01-10-2011, 09:12 AM
Elmah logs errors correctly but doesn't send any emails.
It sends mail correctly when running locally with identical code and web.config.

Settings:

<errorMail from="CQC Error &lt;error@mydomain.com&gt;"
to="error@mydomain.com"
subject="Error"
async="true"
smtpPort="25"
smtpServer="smtp.mydomain.com"
userName="error@mydomain.com"
password="xxxxxxxxxxxxxx" />

I'm guessing it's an authentication problem, since it works locally where I run the web as an administrator, while the public web is run by an anonymous user (app pool identity).

Any ideas how I can fix this?

bruce
01-17-2011, 03:37 PM
try switch to "localhost" as the SMTP server. You do not need to authenticate