[FIX] mail.mail: Fix the issue of AssertionError, if email was failed due to connection lost or misconfiguration