Create send_mail function