add function of sending email