fallback to using site email in case of user without email (#4757)

This commit is contained in:
Frédéric Péters 2014-04-30 10:10:24 +02:00
parent 5d9bb1a517
commit 05b4b625f7
1 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ def email_notification_of_tasks(context, event):
if email_from:
break
else:
email_from = api.user.get_current().email or 'admin@localhost'
email_from = api.user.get_current().email or api.portal.get().getProperty('email_from_address')
subject = '%s - %s' % (context.title, document.title)
body = translate(_('You received a request for action in the GED.'), context=context.REQUEST) + \
@ -317,7 +317,7 @@ def email_notification_of_refused_task(context, event):
if not email_enquirer:
return
email_from = api.user.get_current().email or 'admin@localhost'
email_from = api.user.get_current().email or api.portal.get().getProperty('email_from_address')
subject = '%s - %s' % (context.title, document.title)