Elmah not sending mail in winhost

Discussion in 'Site Programming, Development and Design' started by aciang, Aug 20, 2011.

  1. Hello,

    is it possible for elmah sending mail from Winhost?
    it work perfectly on local, but not in production.

    I am with .net4, please advise.
    below is the web config:

    Code:
    
      <configSections>
        <sectionGroup name="elmah">
          <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
          <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
          <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
          <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
        </sectionGroup>
      </configSections>
    
    <httpModules>
          <!--<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />-->
          <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
          <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
        </httpModules>
    
    <modules runAllManagedModulesForAllRequests="true">
          <!--<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />-->
          <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
          <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
        </modules>
    
    <elmah>
        <security allowRemoteAccess="1" />
        <!--<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />-->
        <errorMail from="[email protected]"
            to="[email protected]"
            subject="elmah error mail"
            smtpPort="25"
            smtpServer="mail.domain.com"
            userName="postmaster"
            password="xxxxx"
        />
    
        <errorFilter>
          <test>
          </test>
        </errorFilter>
      </elmah>
    
    
     
    Last edited by a moderator: Oct 14, 2015
  2. Good catch, thanks for posting the follow-up.
     

Share This Page