mail
mail copied to clipboard
fix: close smtp connection after sending or on error
Unfortunately, getSMTPObject() creates a connection if it's not already established. Ideally, the connection is already established due to the send command some lines above so we only close it. There is no way around it because the wrapped SMTP object is private.