다음을 통해 공유


ChangePassword.OnSendMailError(SendMailErrorEventArgs) 메서드

정의

SendMailError 사용자에게 전자 메일 메시지를 보낼 수 없는 경우 이벤트를 발생합니다.

protected:
 virtual void OnSendMailError(System::Web::UI::WebControls::SendMailErrorEventArgs ^ e);
protected virtual void OnSendMailError(System.Web.UI.WebControls.SendMailErrorEventArgs e);
abstract member OnSendMailError : System.Web.UI.WebControls.SendMailErrorEventArgs -> unit
override this.OnSendMailError : System.Web.UI.WebControls.SendMailErrorEventArgs -> unit
Protected Overridable Sub OnSendMailError (e As SendMailErrorEventArgs)

매개 변수

e
SendMailErrorEventArgs

SendMailErrorEventArgs 이벤트 데이터를 포함하는 개체입니다.

설명

OnSendMailError 메서드는 사용자가 암호를 변경한 후 전자 메일 메시지를 보내려고 시도하는 동안 SMTP 메일 시스템에서 예외가 발생할 때 호출됩니다.

Exception 매개 변수로 e 전달된 개체의 SendMailErrorEventArgs 속성을 검사하여 예외의 실제 원인을 확인합니다. 가장 일반적인 이유는 Web.config 파일 섹션의 구성 오류 smtp 입니다.

예외가 Handled 처리되었음을 알리려면 true 매개 변수로 e 전달된 개체의 속성을 설정해야 합니다. 그렇지 않으면 예외가 다시 throw됩니다.

이벤트를 발생시키는 경우 대리자를 통해 이벤트 처리기가 호출됩니다. 자세한 내용은 ASP.NET Web Forms 페이지의 서버 이벤트 처리를 참조하세요.

또한 이 OnSendMailError 메서드를 사용하면 파생 클래스가 대리자를 연결하지 않고도 이벤트를 처리할 수 있습니다. 파생 클래스에서 이벤트를 처리하기 위한 기본 설정 기술입니다.

상속자 참고

파생 클래스에서 메서드를 재정의 OnSendMailError(SendMailErrorEventArgs) 하는 경우 등록된 대리자가 이벤트를 받을 수 있도록 기본 클래스에 대한 메서드를 호출 OnSendMailError(SendMailErrorEventArgs) 해야 합니다.

적용 대상

추가 정보