예제 #1
0
 private bool Send(EmailInfo oEmailInfo)
 {
     Email email = new Email(oEmailInfo);
     if (HttpContext.Current.Request.IsLocal)
     {
         return email.SendFromLocal();
     }
     return email.Send();
 }
예제 #2
0
 // Methods
 protected void btnSend_Click(object sender, EventArgs e)
 {
     this.Page.Validate("emailSend");
     if (this.Page.IsValid)
     {
         Email email = new Email();
         email.From = this.txtFrom.Text.Trim();
         email.To = this.txtTo.Text.Trim();
         email.Subject = this.txtSubject.Text.Trim();
         email.Body = this.edtBody.TextHTML;
         if (base.Request.IsLocal)
         {
             email.SendFromLocal();
             base.BuildPopup("Message has been successfully sent");
         }
         else if (email.Send())
         {
             base.BuildPopup("Message has been successfully sent");
         }
         else
         {
             base.BuildPopup(MicNets.Model.Utility.NOTICE_INTERNAL_ERROR);
         }
     }
 }