Update function send_email (not complete auto run)