// Methods protected void btnRegister_Click(object sender, EventArgs e) { this.Page.Validate("Registration"); if (this.Page.IsValid) { StringBuilder strbMeg = new StringBuilder("Please, correct the following invalid item(S)" + Utility.JS_NEW_LINE + Utility.JS_NEW_LINE); bool flag = true; flag = this.IsEmailValid(strbMeg); if (this.IsUserNameValid(strbMeg) && flag) { this.oUser.Info.UserName = this.txtUserName.Text.Trim(); this.oUser.Info.Email = this.txtEmail.Text.Trim(); this.oUser.Info.Password = this.txtPassword.Text.Trim(); this.oUser.Info.CustRole = NRole.MEMBER; Email email = new Email(); email.To = this.oUser.Info.Email; if (this.oUser.Add()) // && !base.Request.IsLocal) && email.SendRegConfirmEmail(this.oUser.Info.Password)) { base.BuildPopup("User " + this.oUser.Info.UserName + " has been successfully registered in Database."); email.SendRegConfirmEmail(this.oUser.Info.Password, Request.IsLocal); } } else { base.BuildPopup(strbMeg.ToString()); } } }
// 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); } } }
private bool Send(EmailInfo oEmailInfo) { Email email = new Email(oEmailInfo); if (HttpContext.Current.Request.IsLocal) { return email.SendFromLocal(); } return email.Send(); }
public bool SendEmail(EmailInfo oInfo, string password) { if (password.Equals(ConfigurationManager.AppSettings["ServicePassword"].ToString())) { Email email = new Email(oInfo); return email.Send(); } return false; }
// Methods protected void btnRecover_Click(object sender, EventArgs e) { this.Page.Validate(); if (this.Page.IsValid) { Customer customer = new Customer(); customer.Info.Email = this.txtEmail.Text.Trim(); customer.Info.UserName = this.txtUserName.Text.Trim(); Email email = new Email(); email.To = this.txtEmail.Text.Trim(); if (email.SendPwdRecoveryEmail("12345", Request.IsLocal)) { base.BuildPopup("Your password has been retrieved and sent to your email."); } } }
public void WeeklyUpdate() { Email email = new Email(); string str = "http://www.micnets.com/sitemap.ashx"; NSearchEngineURL[] eurlArray = new NSearchEngineURL[4]; eurlArray[1] = NSearchEngineURL.YAHOO; eurlArray[2] = NSearchEngineURL.MSN; eurlArray[3] = NSearchEngineURL.ASK; NSearchEngineURL[] eurlArray2 = eurlArray; for (int i = 0; i < eurlArray2.Length; i++) { string url = this.oHelp.GetStringValue(eurlArray2[i]) + str; if (!this.SendHttpRequest(url)) { email.SendErrorNotice("WeeklyUpdate: failure to send a request to " + eurlArray2[i].ToString()); } } }