SendMailJobErrorReason Property
Gets the reason of the error which prevented the mail message from being sent or submitted to the pickup folder.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public MailBeeException ErrorReason { get; }

Property Value

Type: MailBeeException
A reference to the exception (descendant of MailBeeException) which prevented the mail message from successful sending or submitting to the pickup folder, or a null reference (Nothing in Visual Basic) if the mail message was sent or submitted successfully.
Because methods which process jobs queue (such as SendJobs or SubmitJobsToPickupFolder(String, Boolean)) operate on multiple jobs in this queue, it would be inconvenient if failure of any job stopped the entire process. Thus, methods which process jobs do not raise exceptions and silently continue to the next job in the queue in the case of error. Still, the application has ways of tracking failures (for instance, MessageNotSent event or JobsFailed collection). In the case of JobsFailed, ErrorReason can be used for every job in this collection to determine exact reason of the error.
See Also