c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #12928
[Bug 703958] [NEW] mail_gateway proposal to add 'headers' item to msg
Public bug reported:
I propose we add a new item to the dictionary, we already have
msg['body'] and msg['from'] etc but "unsupported" headers get lost in
this function, therefor I suggest we add an item msg['headers']
containing pairs of name, value.
Here is how it should look :
=== modified file 'addons/mail_gateway/mail_gateway.py'
--- addons/mail_gateway/mail_gateway.py 2010-11-16 09:51:53 +0000
+++ addons/mail_gateway/mail_gateway.py 2010-12-07 16:39:01 +0000
@@ -481,6 +481,9 @@
if 'X-Priority' in fields:
msg['priority'] = msg_txt.get('X-Priority', '3 (Normal)').split(' ')[0]
+ # Store the other headers
+ msg['headers'] = dict(msg_txt.items())
+
if not msg_txt.is_multipart() or 'text/plain' in msg.get('Content-Type', ''):
encoding = msg_txt.get_content_charset()
body = msg_txt.get_payload(decode=True)
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/703958
Title:
mail_gateway proposal to add 'headers' item to msg
Status in OpenObject Addons Modules:
New
Bug description:
I propose we add a new item to the dictionary, we already have
msg['body'] and msg['from'] etc but "unsupported" headers get lost in
this function, therefor I suggest we add an item msg['headers']
containing pairs of name, value.
Here is how it should look :
=== modified file 'addons/mail_gateway/mail_gateway.py'
--- addons/mail_gateway/mail_gateway.py 2010-11-16 09:51:53 +0000
+++ addons/mail_gateway/mail_gateway.py 2010-12-07 16:39:01 +0000
@@ -481,6 +481,9 @@
if 'X-Priority' in fields:
msg['priority'] = msg_txt.get('X-Priority', '3 (Normal)').split(' ')[0]
+ # Store the other headers
+ msg['headers'] = dict(msg_txt.items())
+
if not msg_txt.is_multipart() or 'text/plain' in msg.get('Content-Type', ''):
encoding = msg_txt.get_content_charset()
body = msg_txt.get_payload(decode=True)
Follow ups
References