597
597
def _send_mail_using_sendmail(to_address, subject, body):
598
598
# format as a proper mail
600
605
charset = email.Charset.Charset("utf-8")
601
606
charset.body_encoding = email.Charset.QP
607
609
sendmail = subprocess.Popen(
608
610
[SENDMAIL_BINARY, "-oi", "-t"], stdin=subprocess.PIPE)
609
611
sendmail.stdin.write(msg.as_string())