Setting ExceptionsToAppLog will log any exceptions to the windows application event log.
Be sure you have permissions to write to the application log, or an unhandled exception will be thrown.
[C#]
EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.LogExceptionToEventLog = true;
msg.Subject = "Daily Newsletter";
msg.Body = "Here is our daily newsletter.....";
msg.Send();
[Visual Basic]
Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@MyCompany.com"
msg.To = "you@YourCompany.com"
msg.LogExceptionToEventLog = True
msg.Subject = "Daily Newsletter"
msg.Body = "Here is our daily newsletter....."
msg.Send()