Initialize SMTP settings for ELMAH using code

The application includes:

  • ASP.NET MVC Web Application
  • DAL
  • Background service
  • Library project

Web application and background service projects use the library project to send emails. SMTP parameters are included in the configuration file in the library project itself.

In this case, is there a way to bind ELMAH to get the SMTP settings from the library project? Perhaps if there is a way to configure ELMAH via code (during Application_Start), this will help to achieve what was intended.

Leadership is much appreciated.

+5
source share
2 answers

You can configure elmah to publish an error report to an HTML address. See this article .

, , , .

, MVC, elmah , , SMTP , .

+1

- [ ].

, . : [link]

, SMTP, , , . , , , , .

+4

All Articles