in reply to Re^3: Putting a utf-8 subject into a mail header
in thread Putting a utf-8 subject into a mail header

Wow. It works. I'm not sure I understand, but I'll save that for later.

Thank you. :)

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Re^4: Putting a utf-8 subject into a mail header

Replies are listed 'Best First'.
Re^5: Putting a utf-8 subject into a mail header
by mr_mischief (Monsignor) on Feb 27, 2009 at 18:13 UTC
    See Encode::MIME::Header for a further explanation. Also, RFC 2047 has the exact format and even a rationale for why it has to be encoded differently from the MIME email body.

    The biggest concerns are, BTW, a lack of information during processing of the headers and backwards compatibility with systems that only support 7bit encoding for headers. It's a header that tells what kind of MIME encoding the body will use. If your headers are encoded using the same method, you have a chicken-and-egg problem. RFC 2047 gives a 7-bit clean escape sequence to state the encoding in the individual header, and both servers and clients expect this method of escaping for non-7bit headers.

    This is a bit of a messy workaround, but it allows your MIME-encoded email with MIME-encoded headers to pass cleanly through SMTP servers that know nothing of these RFCs and be handled properly by the sending and receiving clients anyway.