modified send_mail