Интернационализация ns_sendmail
Понадобилось отправлять почту без вложений, а это как раз тот случай, когда вызов внешней утилиты оказывается слишком накладно. Потому сделал враппер для встроенной в AOL функции ns_sendmail, умеющий корректно обрабатывать не-ASCII символы. # note: _ns_sendmail is exists! if {[info commands orig_ns_sendmail] eq {}} { rename ns_sendmail orig_ns_sendmail package require base64 package require mime # headers are ignored! proc ns_sendmail {to from subject body args} { set headerSet [ns_set create] ns_set put $headerSet Content-Type {text/plain; charset=UTF-8} ns_set put $headerSet Content-Transfer-Encoding base64 ns_set put $headerSet MIME-Version 1.0 orig_ns_sendmail $to \ $from \ [mime::word_encode utf-8 quoted-printable [encoding convertto utf-8 $subject]] \ [base64::encode [encoding convertto utf-8 $body]] \ $headerSet [lindex $args