Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Sending a UTF-8 (Unicode) E-mail

by Anonymous Monk
on Jun 16, 2014 at 02:11 UTC ( [id://1089985]=note: print w/replies, xml ) Need Help??

in reply to Sending a UTF-8 (Unicode) E-mail

I tried to add a date and a reply-to header. The date worked but not the reply-to. In strict, the reply-to throws an error 500 (can't have "reply" as stand alone word) and in non-strict, it just doesn't add it.

Do you know how to solve this issue? Are there more complete examples out there? So far, this page was the best to solve my accents problems in the headers. Utf-8 characters were not causing problems in the message body.



Replies are listed 'Best First'.
Re^2: Sending a UTF-8 (Unicode) E-mail
by zentara (Archbishop) on Jun 16, 2014 at 10:21 UTC
    Hi, I'm not fully up-to-date on the issue, but I did have this note in my archives, which I can't find the original source, but here it is:
    Non USASCII characters *in headers* require special encoding: 1) use Encode; $x="...."; $x_for_header = Encode::encode('MIME-Q', $x); MIME-Q is the best for mostly USASCII strings MIME-B is the best for mostly non USASCII strings 2) Add one extra header to *fully* declare body encoding: print MAIL "Content-Transfer-Encoding: 8bit\n";
    Hope it helps.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1089985]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-06-16 04:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.