Initialize SMTP settings for ELMAH through code

Viewed 693

The application includes:

  • ASP .NET MVC web app
  • DAL
  • Background Service
  • Library project

The web app and background service projects use the library project to send emails. SMTP settings are included in a config file in the library project itself.

In this scenario, is there a way to bind ELMAH to pick up SMTP settings from the library project? Perhaps if there's a way to configure ELMAH through code (during Application_Start), it would help achieve what's intended.

Guidance much appreciated.

2 Answers
Related