adding functionality to send email