adds send email function