transfer encoding in header fields
Daniel Carvalho <[email protected]> Thu, 07 Jul 2005 13:12:15 +0100
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
hi i'm trying a very basic program to read messages from mozilla mail folders. The methods body(), subjec(), to(), from() etc don't decode the data. It comes in quoted-printable or other Content-transfer-encoding. To get the decoded body, i can call decoded(). And how about the headers fields - to, subject etc? Shouldn't MailBox deal with that transparently? This is an example address i get when calling from(): "=?iso-8859-1?q?Maria=20Ba?= <[email protected]>" -- use Mail::Message; use Mail::Box::Mbox; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => $ARGV[0]); $msg= $folder->message(1); print "1)".$msg->subject."\n"; print "2)".$msg->body()."\n"; print "3)".$msg->decoded."\n";