Commit 1f2de683 authored by Jean-Paul Smets's avatar Jean-Paul Smets

only send notification if email defined


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@664 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5b116e3
...@@ -130,7 +130,8 @@ class Message: ...@@ -130,7 +130,8 @@ class Message:
def notifyUser(self, activity_tool, message="Failed Processing Activity"): def notifyUser(self, activity_tool, message="Failed Processing Activity"):
user_email = activity_tool.portal_memberdata.getProperty('email') user_email = activity_tool.portal_memberdata.getProperty('email')
mail_text = """From: %s if user_email:
mail_text = """From: %s
To: %s To: %s
Subject: %s Subject: %s
...@@ -140,7 +141,7 @@ Document: %s ...@@ -140,7 +141,7 @@ Document: %s
Method: %s Method: %s
""" % (activity_tool.email_from_address, user_email, """ % (activity_tool.email_from_address, user_email,
message, message, '/'.join(self.object_path), self.method_id) message, message, '/'.join(self.object_path), self.method_id)
activity_tool.MailHost.send( mail_text ) activity_tool.MailHost.send( mail_text )
class Method: class Method:
......
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