Added function to send email