Error Event
Provides information about errors during SMTP operations.
Syntax
public event OnErrorHandler OnError; public delegate void OnErrorHandler(object sender, SmtpclientErrorEventArgs e); public class SmtpclientErrorEventArgs : EventArgs { public int ErrorCode { get; } public string Description { get; } }
Public Event OnError As OnErrorHandler Public Delegate Sub OnErrorHandler(sender As Object, e As SmtpclientErrorEventArgs) Public Class SmtpclientErrorEventArgs Inherits EventArgs Public ReadOnly Property ErrorCode As Integer Public ReadOnly Property Description As String End Class
Remarks
This event is fired in case of exceptional conditions occured during SMTP operations.
ErrorCode contains an error code and Description contains a textual description of the error.