Forum OpenACS Q&A: Response to ns_sendmail and utf-8

Collapse
Posted by Reuven Lerner on

Bob, your answer was indeed quite helpful! I now have UTF-8 e-mail working just fine.

Bob put me on track to modify the SMTP headers. I set the "Content-Transfer-Encoding" header to "8bit" in outgoing e-mail. This ensured that I was getting the right number of bytes on the receiving end, but they weren't quite the right ones.

Thanks to Google, I found an article by Henry Minsky in which he described how he had to rewrite part of ns_sendmail in order to set the encoding on the outgoing socket. I figured that I might as well try it, and modified modules/tcl/sendmail.tcl such that it now sets the encoding to utf-8.

Sure enough, things now work! Thanks again for the help.