Better error checking for sending emails.