Improved the email testing script.