1
votes

I've been trying unsuccessfully to get Elmah email setup in my Azure Website. I can get it working on my localhost using either the GMail or Hotmail SMTP settings. However when deployed to my azure website it doesn't work. My exceptions are logging correctly in both local and production. Only the email is failing (or net even attempting to send, I've been unable to track down an error or exception)

Is this possible to setup in an Azure Website?

My elmah email settings:

<errorMail
      from="[email protected]"
      to="[email protected]"
      subject="Error"
      async="true"
      useSsl="true"
      enablessl="true"
      port="0" />

My Smtp mail settings:

 <smtp from="[email protected]">
        <network enableSsl="true" host="smtp.live.com" port="25" userName="[email protected]" password="somepassword" />
</smtp>

Many thanks!

1
not sure if i'm right. Azure do not provide SMTP, you will need a mail service like SendGrid to send email.JeeShen Lee

1 Answers

0
votes

You need the ErrorMail httpModule.

add this line inside the section

<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />

I would recommend you to watch the video. Episode 56 - Logging, Tracing, and ELMAH in Windows Azure / http://channel9.msdn.com/Shows/Cloud+Cover/Episode-56-Logging-Tracing-and-ELMAH-in-Windows-Azure