Exemplo n.º 1
0
 protected static void AfterSendingEmailHandler(EmailEventArgs e)
 {
     if (AfterSendingEmail != null)
     {
         AfterSendingEmail(new object(), e);
     }
 }
Exemplo n.º 2
0
 protected static void BeforeSendingEmailHandler(EmailEventArgs e)
 {
     if (BeforeSendingEmail != null)
     {
         BeforeSendingEmail(new object(), e);
     }
 }
Exemplo n.º 3
0
 public void Send() {
     if (null != Email)
     {
         if (!string.IsNullOrEmpty(Email.HtmlBody + Email.Body))
         {
             EmailEventArgs e1 = new EmailEventArgs();
             e1.Email = Email;
             e1.CancelEmail = false;
             BeforeSendingEmailHandler(e1);
             bool success = true;
             if(e1.CancelEmail == false)
                 success = Email.Send();
             EmailEventArgs e2 = new EmailEventArgs();
             e2.Email = Email;
             e2.Success = success;
             AfterSendingEmailHandler(e2);
         }
     }
 }
Exemplo n.º 4
0
 public void Send()
 {
     if (null != Email)
     {
         if (!string.IsNullOrEmpty(Email.HtmlBody + Email.Body))
         {
             EmailEventArgs e1 = new EmailEventArgs();
             e1.Email       = Email;
             e1.CancelEmail = false;
             BeforeSendingEmailHandler(e1);
             bool success = true;
             if (e1.CancelEmail == false)
             {
                 success = Email.Send();
             }
             EmailEventArgs e2 = new EmailEventArgs();
             e2.Email   = Email;
             e2.Success = success;
             AfterSendingEmailHandler(e2);
         }
     }
 }
Exemplo n.º 5
0
 protected static void AfterSendingEmailHandler(EmailEventArgs e)
 {
     if (AfterSendingEmail != null)
         AfterSendingEmail(new object(), e);
 }
Exemplo n.º 6
0
 protected static void BeforeSendingEmailHandler(EmailEventArgs e)
 {
     if (BeforeSendingEmail != null)
         BeforeSendingEmail(new object(), e);
 }