Commit a78cb5df authored by Rafael Monnerat's avatar Rafael Monnerat

Fixed email header issues, whan use as_message. This make some emails clients...

Fixed email header issues, whan use as_message. This make some emails clients not show the message. Thanks to yusei help.

 


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22405 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06157374
...@@ -133,16 +133,14 @@ class BaseMailTemplate: ...@@ -133,16 +133,14 @@ class BaseMailTemplate:
security.declareProtected('View', 'as_message') security.declareProtected('View', 'as_message')
def as_message(self,**kw): def as_message(self,**kw):
msg,values,headers = self._process(kw) msg,values,headers = self._process(kw)
multipart_kw = {} multipart_kw = {}
subtype = kw.get('subtype') #subtype = kw.get('subtype')
if subtype: #if subtype:
multipart_kw['_subtype'] = subtype # multipart_kw['_subtype'] = subtype
boundary = kw.get('boundary') #boundary = kw.get('boundary')
if boundary: #if boundary:
multipart_kw['boundary'] = boundary # multipart_kw['boundary'] = boundary
multipart = MTMultipart(self, multipart = MTMultipart(self,
values['mfrom'], values['mfrom'],
...@@ -150,7 +148,7 @@ class BaseMailTemplate: ...@@ -150,7 +148,7 @@ class BaseMailTemplate:
**multipart_kw) **multipart_kw)
# set the encoding for the container # set the encoding for the container
multipart.set_charset(msg.get_charset()) #multipart.set_charset(msg.get_charset())
for header,value in headers: for header,value in headers:
multipart[header]=value multipart[header]=value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment