Create send_email function