add debug output for send_mail