Elmah works for error handling, but won't send email

Discussion in 'ASP.NET / ASP.NET Core' started by Sire, Jan 10, 2011.

  1. Elmah logs errors correctly but doesn't send any emails.
    It sends mail correctly when running locally with identical code and web.config.

    Settings:

    Code:
    <errorMail from="CQC Error &lt;[email protected]&gt;"
    to="[email protected]"
    subject="Error"
    async="true"
    smtpPort="25"
    smtpServer="smtp.mydomain.com"
    userName="[email protected]"
    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?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    try switch to "localhost" as the SMTP server. You do not need to authenticate
     

Share This Page