This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mimetools message's To field can't be changed
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, fullung2
Priority: normal Keywords:

Created on 2006-06-28 10:51 by fullung2, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg28967 - (view) Author: Albert Strasheim (fullung2) Date: 2006-06-28 10:51
Steps to reproduce:

>>> from email.MIMEText import MIMEText
>>> msg = MIMEText('')
>>> msg['To'] = 'foo@bar.com'
>>> msg['To']
'foo@bar.com'
>>> msg['To'] = 'foo@baz.com'
>>> msg['To']
'foo@bar.com' (should be @baz.com?)

Same problem exists in Python 2.4.3 and Python 2.5b1.
msg28968 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2006-07-28 02:29
Logged In: YES 
user_id=12800

Remember that you can add multiple headers to any message,
so in you're example you've added two To headers.  Also
remember that the dictionary interface will return one of
those multiple headers, but not all of them.  Use
msg.get_all('to') to see them all or del msg['to'] to delete
them all.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43570
2006-06-28 10:51:56fullung2create