Elmah email at

ELMAH (Error Logging Modules and Handlers) is a popular open-source library for.NET that provides a way to log and handle errors in your application. One of the features of ELMAH is the ability to send error notifications via email.

To configure ELMAH to send error notifications via email, you'll need to follow these steps:

  1. Install ELMAH: If you haven't already, install ELMAH in your.NET project using NuGet: Install-Package Elmah.

  2. Configure ELMAH: In your web.config file, add the following configuration settings:

    <configuration>
    <elmah>
     <errorLog type="Elmah.XmlFileErrorLog, Elmah" />
     <email>
       <from>[email protected]</from>
       <to>[email protected]</to>
       <subject>Error in {ApplicationName}</subject>
       <smtp server="your_smtp_server" port="25" />
     </email>
    </elmah>
    </configuration>

    Replace the placeholders with your own email address, recipient email address, and SMTP server settings.

  3. Enable email notifications: In your web.config file, set the email attribute to true in the <elmah> section:

    <elmah>
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" />
    <email enabled="true" />
    </elmah>
  4. Test email notifications: To test email notifications, you can simulate an error in your application by throwing an exception or using a tool like Fiddler to send a fake error request to your application.

Once you've configured ELMAH to send email notifications, it will send an email to the specified recipient whenever an error occurs in your application. The email will contain details about the error, including the error message, stack trace, and other relevant information.

Note that you may need to adjust the email settings and configuration to fit your specific requirements. Additionally, you may want to consider implementing additional error handling and logging mechanisms to complement ELMAH's email notifications.