Fix SMTP behavior when using external SMTP_SERVER