adding email send function