protected void OnSendMailError(object sender, SendMailErrorEventArgs e) { //Event handler for event that occurs when the SMTP Mail system throws an //error while attempting to send an e-mail message Master.ReportError(e.Exception, 4); e.Handled = true; }
/// <summary> /// Called when [send mail error]. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The <see cref="System.Web.UI.WebControls.SendMailErrorEventArgs"/> instance containing the event data. /// </param> /// <remarks> /// </remarks> protected void OnSendMailError(object sender, SendMailErrorEventArgs e) { if (!e.Handled) { this.state = State.SendMailError; this.currentErrorText = e.Exception.Message; } }
protected void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e) { log.Error("Unable to send new password to user " + PasswordRecovery1.UserName); e.Handled = true; Session["ErrorMessage"] = "No se pudo enviar la nueva contraseña al usuario. Error " + e.Exception.Message; Response.Redirect("~/FatalError.aspx"); }
void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e) { String logMessage = "unable to send password recovery email. Please check the system.net MailSettings section in web.config"; log.Error(logMessage, e.Exception); lblMailError.Text = Resource.PasswordRecoveryMailFailureMessage; e.Handled = true; SiteLabel successLabel = (SiteLabel)PasswordRecovery1.SuccessTemplateContainer.FindControl("successLabel"); if (successLabel != null) { successLabel.Visible = false; } }
protected void _SendMailError(object sender, SendMailErrorEventArgs e) { Message1.Visible = true; Message1.Text = "Could not send email to confirm password change."; // The MySamplesSite event source has already been created by an administrator. System.Diagnostics.EventLog myLog = new System.Diagnostics.EventLog(); myLog.Source = "MySamplesSite"; myLog.Log = "Application"; myLog.WriteEntry( "Sending mail via SMTP failed with the following error: " + e.Exception.Message.ToString(), System.Diagnostics.EventLogEntryType.Error); e.Handled = true; }
protected void PasswordRecovery_SendMailError(object sender, SendMailErrorEventArgs e) { System.Text.StringBuilder mailLink = new System.Text.StringBuilder("<a href=\"mailto:"); try { mailLink.Append(SiteSettings.GetSharedSettings().SiteEmailAddress); } catch { mailLink.Append("#"); } mailLink.Append("\">system administrator</a>"); PasswordRecovery.SuccessText = "A problem occurred sending the email. " + "Please contact the " + mailLink.ToString() + "."; e.Handled = true; }
protected void PasswordRecovery_SendMailError(object sender, SendMailErrorEventArgs e) { //System.Text.StringBuilder mailLink = new System.Text.StringBuilder("<a href=\"mailto:"); //try //{ // mailLink.Append(SiteSettings.GetSharedSettings().SiteEmailAddress); //} //catch //{ // mailLink.Append("#"); //} //mailLink.Append("\">system administrator</a>"); //PasswordRecovery.SuccessText = "A problem occurred sending the email. " + // "Please contact the " + mailLink.ToString() + "."; //e.Handled = true; }
}//public void CreateUserWizard_SendingMail() /// <summary>CreateUserWizard_SendingMailError</summary> public void CreateUserWizard_SendMailError ( object sender, SendMailErrorEventArgs sendMailErrorEventArgs ) { UtilityEventLog.WriteEntry ( "Application", //Log null, //Machine name "Membership", //Source "Sending mail via SMTP failed with the following error: " + sendMailErrorEventArgs.Exception.Message.ToString(), System.Diagnostics.EventLogEntryType.Error ); sendMailErrorEventArgs.Handled = true; }//public void CreateUserWizard_SendMailError()
public static void w_SendMailError(object sender, SendMailErrorEventArgs e) { e.Handled = true; }
/// <summary> /// Handles the SendMailError event of the PasswordRecovery1 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="SendMailErrorEventArgs"/> instance containing the event data.</param> protected void PasswordRecovery1_SendMailError([NotNull] object sender, [NotNull] SendMailErrorEventArgs e) { // it will fail to send the message... e.Handled = true; }
protected void CreateUserWizard1_SendMailError(object sender, SendMailErrorEventArgs e) { SystemMessages.DisplaySystemWarningMessage(Resources.UserData.MessageErrorSendMail); e.Handled = true; }
protected void PasswordRecovery_SendMailError(object sender, SendMailErrorEventArgs e) { // we do not send any emails e.Handled = true; }
private void SiteSpecificErrorLoggingProcedure(SendMailErrorEventArgs e) { // Site-specific code for logging e-mail errors goes here. }
protected override void OnSendMailError(SendMailErrorEventArgs e) { this.SiteSpecificErrorLoggingProcedure(e); e.Handled = true; }
protected void CreateUserWizard1_sendEmailError(object sender, SendMailErrorEventArgs e ) { //System.Windows.Forms.MessageBox.Show("mail--" + e.Exception.Message); Response.Redirect("customError.aspx?Error=" + e.Exception.Message + "### SendEmail"); }
public void SendMailError(object sender, SendMailErrorEventArgs e) { Response.Redirect("~/smtperror.htm"); }
protected void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e) { AlertMessage(e.Exception.ToString()); }
protected void PWRecovery_SendMailError(object sender, SendMailErrorEventArgs e) { }
protected void CreateUserWizard1_SendMailError(object sender, SendMailErrorEventArgs e) { CreateUserWizard1.BackColor = Color.Red; }
/// <summary> /// Called if the mailsettings don't exist in the web.config. This is ok, since we use SharePoint /// to send the email. Simply call our send email function. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void _ctlPasswordRecovery_SendMailError(object sender, SendMailErrorEventArgs e) { e.Handled = true; SendEmail(); }
protected void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e) { }
protected void OnSendMailError(object sender, SendMailErrorEventArgs e) { Util.PageMessage(this, "An unknown error occured while sending the credentials e-mail. Please try again later."); }
/// <summary> /// Sends the mail error. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="T:System.Web.UI.WebControls.SendMailErrorEventArgs"/> instance containing the event data.</param> protected void SendMailError(Object sender, SendMailErrorEventArgs e) { ErrorManager.GenerateError(e.Exception.Message); e.Handled = true; }
protected void PasswordRecovery1_SendMailError(object sender, SendMailErrorEventArgs e) { Flash.Attributes["class"] = "flash_alert"; lblInfo.Text = "Error al enviar el mail, intente de nuevo"; }
protected void OnSendMailError(object sender, SendMailErrorEventArgs e) { //Event handler for event that occurs when the SMTP Mail system throws an error while attempting to send an e-mail message e.Handled = false; }