wks: Put stdout into binary mode for Windows.
authorWerner Koch <wk@gnupg.org>
Wed, 8 Mar 2017 16:23:31 +0000 (17:23 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 8 Mar 2017 16:25:27 +0000 (17:25 +0100)
commit5c83759364272b19ceafbef46d057f0430a12698
tree1e9bfbb91b6d61d27ce86737e51c0318e4ea6329
parentdd60e868d2bf649a33dc96e207ffd3b8ae4d35af
wks: Put stdout into binary mode for Windows.

* tools/send-mail.c (send_mail_to_file): Call es_set_binary.
--

Without that, output to stdout via --send is mangled: The "\r\n" is
translated to "\r\r\n" which is bad because other
software (e.g. Thunderbird) translates this again to "\n\n" and thus
put all mail header liens after the first into the body.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/send-mail.c