adding send email functionality