move send_email function to hidden