-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
headers with the same name get clobbered #58
Comments
👍 Came here to say this. This applies for parsed .msg files ( |
In the mean time, you can solve this for headers = message.headers
headers['Received'] = [recv.replace('\n', '') for recv in message.received_raw] For the other headers, I don't think you'll be able to currently, due to the lack of |
@mortea15 are you seeing this happen for received headers? The |
I need to have a raw mail to test it. If you still have this problem, open another issue. |
you just need to duplicate a header with a different value...
|
This was an issue of
Get |
some headers, such as
Authentication-Results
, can occur multiple times in a message. the current code clobbers previous values.it seems like the following places need to be updated to support headers having lists of values found in a message. all headers could have values that are lists, or only the ones that have more than one value.
the current code uses
email.message.get()
but needs to useemail.message.get_all()
. https://docs.python.org/3/library/email.message.html#email.message.EmailMessage.get_allThe text was updated successfully, but these errors were encountered: