Y
Yohan N. Leder
Hello,
I would like to send UTF-8 material and binary attachment in an email.
So, for this, I've built a multipart/mixed MIME message : no problem
about this.
But, my problem is about UTF-8 encoding.
The two parts which can contains no-ascii characters using UTF-8
encoding are : the subject and the body. So, I've first tried to encode
the subject line as indicated at http://www.ietf.org/rfc/rfc2047.txt. It
gives something like this :
use utf8;
use open ':utf8';
use Encode;
my $subject = encode('MIME-B', "boîte");
Email is well sent and received, but the client email I'm using (Eudora)
display the accentuated "i" as "î".
I've also tried not using Encode::MIME::Header, with several ways like :
my $subject = "=?UTF-8?B?".2b64("boîte")."?=";
my $subject = "=?UTF-8?B?".2b64(encode_utf8("boîte"))."?=";
And, even without "use open ':utf8';" which is used at sendmail pipe
time through "open (SENDMAIL, "|sendmail -t") or die "err open sendmail"
So, what's wrong ?
And I've not seen about body at this time :-(
I would like to send UTF-8 material and binary attachment in an email.
So, for this, I've built a multipart/mixed MIME message : no problem
about this.
But, my problem is about UTF-8 encoding.
The two parts which can contains no-ascii characters using UTF-8
encoding are : the subject and the body. So, I've first tried to encode
the subject line as indicated at http://www.ietf.org/rfc/rfc2047.txt. It
gives something like this :
use utf8;
use open ':utf8';
use Encode;
my $subject = encode('MIME-B', "boîte");
Email is well sent and received, but the client email I'm using (Eudora)
display the accentuated "i" as "î".
I've also tried not using Encode::MIME::Header, with several ways like :
my $subject = "=?UTF-8?B?".2b64("boîte")."?=";
my $subject = "=?UTF-8?B?".2b64(encode_utf8("boîte"))."?=";
And, even without "use open ':utf8';" which is used at sendmail pipe
time through "open (SENDMAIL, "|sendmail -t") or die "err open sendmail"
So, what's wrong ?
And I've not seen about body at this time :-(