[Email-SIG] encoding To headers

Barry Warsaw barry at python.org
Sat Jan 15 17:22:17 CET 2005


On Wed, 2005-01-05 at 05:55, Stuart Bishop wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Wichert Akkerman wrote:
> | It's been a month since I posted this; can I safely assume nobody knows
> | the answer or is it just not possible?
> 
> I never saw your original message sorry.
> 
> There is code that will correctly encode and decode email addresses at
> http://stuartbishop.net/Software/EmailAddress. It handles the case you
> mention, as well as handling Unicode domain names if you should ever
> actually see one.
> 
> |>I am trying to figure out how to use an 'internationaled' To-header but
> |>not succeeding so far. The basic documented approach does not work:
> |>
> |>
> |>>>>mail["From"]=email.Header.Header(, "utf-8")
> |>>>>print mail.as_string()
> |>
> |>[...]
> |>From: =?utf-8?b?dMODwrhzdGk=?=
> |>
> |>this is not allowed by the RFCs: the address must not be encoded. Using
> |>quoted-printable would fix this but I can not find any documentation
> |>as to how to do that.
> |>
> |>All current documentation mentions that specifying encoders is
> |>deprecated, but without setting them the email module seems to insist on
> |>using base64 encoding.
> |>
> |>Wichert.

Stuart, 

I wonder if it makes sense to try to fold this into the email package?  

On a related note, Pycon2005 is coming up soon and I will be attending. 
There are four days of sprints preceding the conference and last year,
Anthony, Thomas and I sprinted on the new feed parser.  While we didn't
finish that work during the sprint, I think that session was more
successful than my following Mailman3 sprint.  The fruits of the email
sprint are evident in the new FeedParser that's part of email 3.0.

Does anybody want to sprint on the email package again this year?  Some
things we could work on include:

- An RFC compliant email address parser

- Adding better header support

- Adding a persistency and/or external storage API, or developing a
relational model for storing email messages.

- Another round of API fixes, and/or sprinting on bugs.

- Switching the Python stdlib away from deprecated modules such as
rfc822.

Let's gather some thoughts here and if there's enough interest, I'll
sign up for a sprint at Pycon2005.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/email-sig/attachments/20050115/91f23327/attachment.pgp


More information about the Email-SIG mailing list