Fix handle unknown error in MailTransport

Fix handle unknown error in MailTransport
Merge pull request #3860 from MichalWadowski/patch-2

Fix handle unknown error in MailTransport