Improve error messages; send test email only if
the email address is not blank