add function to send mail