Added optional arguments to send_mail.