Smtp Protocol ExceptionLast Response Property
Get the last complete response received from the server before the error occurred.
Definition
Namespace: MailKit.Net.Smtp
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
The last response, if available; otherwise, .
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public SmtpResponse? LastResponse { get; }Property Value
SmtpResponseThe last response, if available; otherwise, .
Remarks
Gets the last complete response that was received from the SMTP server before the error occurred, if any.
The last response is reset each time the client sends a new command, so this value will only be non- when a response was received after the last command was sent. For example, if the server disconnects after accepting a MAIL FROM command that was pipelined with one or more RCPT TO commands, Command will be RcptTo and this value will be the server's response to the MAIL FROM command.