add sending email function