Commit b182a788 authored by Aurel's avatar Aurel

add compatibility for former mail message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18626 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0207de16
......@@ -38,6 +38,8 @@ import smtplib
from zLOG import LOG
_MARKER = []
class MailMessage(Event, CMFMailInMessage):
"""
LEGACY
......@@ -109,3 +111,18 @@ class MailMessage(Event, CMFMailInMessage):
header += "\n"
msg = header + msg
self.MailHost.send( msg )
security.declareProtected(Permissions.AccessContentsInformation, 'getTextContent')
def getTextContent(self, default=_MARKER):
"""
Overload EmailDocument method to add backward compatibility layer
"""
if getattr(self, 'body', None) is not None:
return self.getBody(default)
else:
if default is _MARKER:
return Event.getTextContent(self)
else:
return Event.getTextContent(self, default)
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