Using Sitecore.Logging to send emails
BACKGROUND In this post I will show you how to send an email using the Sitecore.Logging namespace. If you want to get straight to the code here you go ! PROBLEM WE NEED TO SOLVE Do you need to send emails when something happens in your Sitecore website? For example, if you get a critical error and want to email this to a distribution list? Using Sitecore.Diagnostics you can log this error to the Sitecore log, but you still need that email sent to get someone working on the issue asap! Many solutions exist to fit this need. You can use System.Net, you can use nLog or a plethora of other logging systems. But why not use what you already have with Sitecore? Sitecore went ahead and wrapped up the log4net code inside their own dll, Sitecore.Logging.dll. You can use your favorite .NET decompiler to look at the code. I use Telerik's Just Decompile to look under the hood of the Sitecore.Logging.dll. ...