Commit b80da4ef authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added permissions for send by mail.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13322 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8198cde4
......@@ -82,7 +82,7 @@ class Url(Coordinate, Base):
"""
return ("http://www.erp5.org","mailto:info@erp5.org")
security.declareProtected(Permissions.UseMailhostServices, 'send')
def send(self, from_url=None, to_url=None, msg=None, subject=None, attachment_list=None):
"""
This method was previously named 'SendMail' and is used to send email
......@@ -103,7 +103,7 @@ class Url(Coordinate, Base):
to_url = self.getUrlString(None)
if from_url is None or to_url is None:
raise AttributeError, "No mail defined"
# Create multi-part MIME message.
message = StringIO()
writer = MimeWriter(message)
......
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