Message150468
| Author |
r.david.murray |
| Recipients |
kxroberto, r.david.murray |
| Date |
2012年01月02日.17:43:26 |
| SpamBayes Score |
0.00047321102 |
| Marked as misclassified |
No |
| Message-id |
<1325526207.3.0.418282512916.issue13693@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Actually, no, the local part cannot be in anything other than ascii (see RFC 5335, which desires to address this problem among others). Also, an encoded word cannot occur inside quotation marks. If you correct those two bugs, you can generate an RFC-valid address using Header.append.
There is a project underway to make all of this header parsing and formatting stuff work better: see the http://pypi.python.org/pypi/email.
By the way, this is easier already in python 3.2. There you can do:
>>> formataddr(('Nameß', 'weofij@fjeio'))
'=?utf-8?b?TmFtZcOf?= <weofij@fjeio>' |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年01月02日 17:43:27 | r.david.murray | set | recipients:
+ r.david.murray, kxroberto |
| 2012年01月02日 17:43:27 | r.david.murray | set | messageid: <1325526207.3.0.418282512916.issue13693@psf.upfronthosting.co.za> |
| 2012年01月02日 17:43:26 | r.david.murray | link | issue13693 messages |
| 2012年01月02日 17:43:26 | r.david.murray | create |
|