fallback to admin@localhost if no admin email address is defined

This commit is contained in:
Frédéric Péters 2014-05-12 13:53:20 +02:00
parent 05b4b625f7
commit e36df33150
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 api.portal.get().getProperty('email_from_address')
email_from = api.user.get_current().email or api.portal.get().getProperty('email_from_address') or 'admin@localhost'
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 api.portal.get().getProperty('email_from_address')
email_from = api.user.get_current().email or api.portal.get().getProperty('email_from_address') or 'admin@localhost'
subject = '%s - %s' % (context.title, document.title)