Hello!

On Wednesday 27 May 2009 00:33:59 Bernhard van Woerden wrote:
> If the subject is long then it should really go on multiple lines using
> header folding.

Well, it's right comment.

===============
# 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 1]
    }
}
===============

> The From and To headers may also contain non ASCII characters.

This code may be simple too, I must to think about...

Best regards, Alexey Pechnikov.
http://pechnikov.tel/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to