Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 28539
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: bas [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: please decode rfc1522 parts
Hi! Currently, the Email::Address objects returned by Mail::Message->from (and I assume also for ->to, etc) still contain undecoded rfc1522 parts. Would it be possible to decode the email addresses (like ->study does)?
Subject: Re: [rt.cpan.org #28539] please decode rfc1522 parts
Date: Sun, 29 Jul 2007 15:05:10 +0200
To: "bas [...] debian.org via RT" <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* bas@debian.org via RT (bug-Mail-Box@rt.cpan.org) [070729 12:01]: Show quoted text
> Transaction: Ticket created by BAS > Queue: Mail-Box > Subject: please decode rfc1522 parts > Broken in: (no value) > Severity: Wishlist > Owner: Nobody > Requestors: bas@debian.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28539 > > > Currently, the Email::Address objects returned by Mail::Message->from > (and I assume also for ->to, etc) still contain undecoded rfc1522 parts. > Would it be possible to decode the email addresses (like ->study does)?
Please be more explicit. Can you show an example. You can also study address fields, which will return a Mail::Message::Field::Addresses object... By the way: rfc1522 is obsoleted by rfc204[5-9]. -- MarkOv
Subject: Re: [rt.cpan.org #28539] please decode rfc1522 parts
Date: Sun, 29 Jul 2007 15:32:37 +0200
To: Mark Overmeer via RT <bug-Mail-Box [...] rt.cpan.org>
From: Bas Zoetekouw <bas [...] zoetekouw.net>
Hi Mark! You wrote: Show quoted text
> Please be more explicit. Can you show an example.
The problem is that Mail::Message->from returns encoded strings like this: $VAR1 = bless( [ '=?iso-8859-1?Q?Lo=EFc?= Minie', 'lool+debian@example.com', '' ], 'Mail::Address' ); instead of a nicely decoded (unicode) string. However, I wasn't aware of this: Show quoted text
> You can also study address fields, which will return a > Mail::Message::Field::Addresses object...
which indeed seems to do exactly what I need. Still, it might be worth considering also decoding the strings in Mail::Message->from, as that seems to be the most straightforward way of retrieving the From header... -- Kind regards, +----------------------------------------------------------------------+ | Bas Zoetekouw | Sweet day, so cool, so calm, so bright, | |----------------------------| The bridall of the earth and skie: | | bas@zoetekouw.net | The dew shall weep thy fall tonight; | +----------------------------| For thou must die. | +-----------------------------------------+
Subject: Re: [rt.cpan.org #28539] please decode rfc1522 parts
Date: Sun, 29 Jul 2007 16:04:30 +0200
To: Bas Zoetekouw via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Bas Zoetekouw via RT (bug-Mail-Box@rt.cpan.org) [070729 13:33]: Show quoted text
> > Please be more explicit. Can you show an example.
> > The problem is that Mail::Message->from returns encoded strings like this: > > $VAR1 = bless( [ > '=?iso-8859-1?Q?Lo=EFc?= Minie', > 'lool+debian@example.com', > '' > ], 'Mail::Address' ); > > instead of a nicely decoded (unicode) string. > > However, I wasn't aware of this: >
> > You can also study address fields, which will return a > > Mail::Message::Field::Addresses object...
> > which indeed seems to do exactly what I need. > > Still, it might be worth considering also decoding the strings in > Mail::Message->from, as that seems to be the most straightforward way of > retrieving the From header...
The Mail::Address object is to dumb to store a compliant representation of an email address.... however, parsing address lines correctly is very performance expensive. Very likely, most applications based on MailBox do not need that quality of parsing, therefor MailBox choose the fast- but-poor as default over the good-but-slow. So: does study() return perfect objects, or are there bugs to report? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #28539] please decode rfc1522 parts
Date: Sun, 29 Jul 2007 16:13:58 +0200
To: Mark Overmeer via RT <bug-Mail-Box [...] rt.cpan.org>
From: Bas Zoetekouw <bas [...] zoetekouw.net>
Hi Mark! You wrote: Show quoted text
> So: does study() return perfect objects, or are there bugs to report?
So far, it seems to work perfectly. -- Kind regards, +----------------------------------------------------------------------+ | Bas Zoetekouw | Sweet day, so cool, so calm, so bright, | |----------------------------| The bridall of the earth and skie: | | bas@zoetekouw.net | The dew shall weep thy fall tonight; | +----------------------------| For thou must die. | +-----------------------------------------+
Apparently satisfied, bug closed