send_mail bugs fixed