Search code examples
smtpsendgridmandrillelmah

Send error emails using Elmah via Mandrill


I have a WebApi project. There is used Elmah to send error emails. Currently it configured with SendGrid. In web config file sendgrid's smtp settings are defined for Elmah.

No we are switching from Sendgrid to Mandrill. The problem is when we send email from Mandrill .NET client (https://github.com/shawnmclean/Mandrill-dotnet), it uses its own set of classes. After setting all email parameters we can send email.

On contrary Sendgrid uses .NET framework's classes (System.Net.Mail), so do Elmah SendMail module.

My question is How to configure Elmah to get it work with Mandrill. Any suggestion will be appreciated. I need guidance rather than the Code.


Solution

  • The .NET client is simply one of the ways to send mails using Mandrill. They also offer plain old SMTP integration. Take a look at the SMTP documentation for details. Your SMTP settings are located on the settings page.