e.Error
already has the Exception that occurred while sending the email async. You can check the Exception.Message
, Exception.InnerException
, Exception.StackTrace
, etc. to get further details.
Update:
Check if the Exception is of type SmtpException and if it is, you can query the StatusCode. Something like
if(e.Exception is SmtpException)
{
SmtpStatusCode code = ((SmtpException)(e.Exception)).StatusCode;
//and go from here...
}
And check here for further details.