示例#1
0
 public bool SendEmail(EmailInfo oInfo, string password)
 {
     if (password.Equals(ConfigurationManager.AppSettings["ServicePassword"].ToString()))
     {
         Email email = new Email(oInfo);
         return email.Send();
     }
     return false;
 }
示例#2
0
 private bool Send(EmailInfo oEmailInfo)
 {
     Email email = new Email(oEmailInfo);
     if (HttpContext.Current.Request.IsLocal)
     {
         return email.SendFromLocal();
     }
     return email.Send();
 }
示例#3
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 = edtBody.Content;
         if (base.Request.IsLocal && email.SendThroughWebService())
         {
             base.BuildPopup("Message has been successfully sent to" + email.To);
         }
         else if (email.Send())
         {
             base.BuildPopup("Message has been successfully sent to" + email.To);
         }
         else
         {
             base.BuildPopup(MicNets.Model.Utility.NOTICE_INTERNAL_ERROR);
         }
     }
 }