This project is read-only.

Modules

Email Unexpected Errors

Step1: Add a reference to the MVCEHS.dll



Step2: Add the EmailUnexpectedError attribute to the controller or action.


or


Step3: Configure your SmtpClient in the Web.Config



..or use the web site administration tool



Step 4: Configure your message settings

There are two ways to do this:

1: in the Web.Config





or

2: Pass the values directly into the attribute’s constructor



And you’re done!

Customising

Changing the email body

Step 1: Create a class that implements IEmailBodyBuilder



Step 2: On Application start, set the DefaultEmailBodyBuilder



Changing what sends the email (this is useful for testing. E.g you could save to a file instead)

Step 1: Create a class that implements IEmailSender



Step 2: On Application start, set the DefaultEmailSender



Buy me a coffee to sponsor this project! Buy me a coffee to sponsor this project!

Last edited Mar 2, 2010 at 5:46 PM by LeePaulSmith, version 10

Comments

No comments yet.