[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-mailbox
Subject: Re: transfer encoding in header fields
From: Mark Overmeer <Mark () Overmeer ! net>
Date: 2005-07-07 12:57:35
Message-ID: 20050707145735.C29481 () speeltuin ! ATComputing ! nl
[Download RAW message or body]
* Daniel Carvalho (dani2005@mailc.net) [050707 14:12]:
> 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?= <blablabla@dada.com>"
For decoding headers you have to use study() in one of its forms
my $cc = $msg->study('cc'); # ==
my $cc = $msg->get('cc')->study; # ==
my $cc = $msg->head->study('cc'); # ==
my $cc = $msg->head->get('cc')->study;
It returns a Mail::Message::Field::Full object, which is smart.
--
MarkOv
------------------------------------------------------------------------
drs Mark A.C.J. Overmeer MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic