update send_email def