Added functionality to change the message after sending an email.