Added functions to send email.