Improve error message when sending a mail