Ejemplo n.º 1
0
 public void SendTestErrorEmail()
 {
     try
     {
         TemplatedErrorEmail.SendExceptionEmail(new ExceptionEmailClass
         {
             AppException =
                 new ApplicationException(
                     @"Application threw an invalid program exception and will be terminated.")
         });
     }
     catch (Exception e)
     {
         Logger.Error($"Error Details: {e.Message}\r\nStack: {e.StackTrace}");
     }
 }
Ejemplo n.º 2
0
 private static void SendTestMailMessage()
 {
     try
     {
         TemplatedErrorEmail.SendFinal("testbody", "Hello world");
         Console.WriteLine("Sent");
     }
     catch (Exception e)
     {
         Logger.Error($"Error Details: {e.Message}\r\nStack: {e.StackTrace}");
         Console.WriteLine("Exception encountered. See log.");
     }
     finally
     {
         Console.ReadLine();
     }
 }