RE: 'Content-Type' problem

"Kjetil Engen" <[email protected]> Thu, 22 Apr 2004 08:39:40 +0200
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <002b01c42834$985e8c00$9e045213@abf1>
I've have the same problem myself, and here are some solutions I've
found for the charset part.

//Might contain errors, I'm working from memory here.
$body = Mail::Message::Body::Lines->new('data' => @lines, 'data' =>
'charset: utf-8');

NB: this one creates a double in the mailsource.
You'll then have both reference to the utf-8


Another options is manually changing the code for MailBox.
To do this you must go to the directory where the MailBox-module is
saved and find a directory calles Message.
There you'll find a file called Body.pm
In that files replace all instances of "us-ascii" with "utf-8".


But I guess there are easier methods, I've just haven't found out how.
Also I'm not sure about fixing quoted-printable.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: 22. april 2004 04:34
To: [email protected]
Subject: 'Content-Type' problem


Hello.


In the following code:

    $body = Mail::Message::Body::Lines->new( 'data' => @lines ) ;
    $msg->body( $body->encode( 'mime_type' => 'text/html',
                                                 'charset' => 'UTF-8',
                                                 'transfer_encoding' =>
'quoted-printable' ) ) ;

the 'mime_type' and 'charset' attribute seemed to be ignored: Whatever I
write, the mail always contains:
    Content-Type: text/plain; charset="us-ascii"

Did I overlook something?


Best regards,

Gilles
-- 
Please consider using encrypted mail.
53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641