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

send to admin as default


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@715 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 580166e0
...@@ -126,8 +126,11 @@ class Message: ...@@ -126,8 +126,11 @@ class Message:
return activity.validate(activity_tool, self, **self.activity_kw) return activity.validate(activity_tool, self, **self.activity_kw)
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') #LOG('notifyUser begin', 0, str(self.user_name))
if user_email: user_email = activity_tool.portal_membership.getMemberById(self.user_name).getProperty('email')
if user_email in ('', None):
user_email = activity_tool.email_from_address
#LOG('notifyUser user_email', 0, str(user_email))
mail_text = """From: %s mail_text = """From: %s
To: %s To: %s
Subject: %s Subject: %s
...@@ -138,7 +141,9 @@ Document: %s ...@@ -138,7 +141,9 @@ 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)
#LOG('notifyUser mail_text', 0, str(mail_text))
activity_tool.MailHost.send( mail_text ) activity_tool.MailHost.send( mail_text )
#LOG('notifyUser send', 0, '')
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