Commit e8a766a7 authored by Romain Courteaud's avatar Romain Courteaud

Do not queue email sending, because CMFActivity can not handle attachments.

Queuing email has to be done by a local MTA.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14575 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 10ebc392
...@@ -117,12 +117,14 @@ class NotificationTool(BaseTool): ...@@ -117,12 +117,14 @@ class NotificationTool(BaseTool):
for person in to_list: for person in to_list:
email_value = person.getDefaultEmailValue() email_value = person.getDefaultEmailValue()
if email_value is not None: if email_value is not None:
email_value.activate(activity='SQLQueue').send( # Activity can not handle attachment
from_url=email_from_address, # Queuing messages has to be managed by the MTA
to_url=email_value.asText(), email_value.send(
subject=subject, from_url=email_from_address,
msg=message, to_url=email_value.asText(),
attachment_list=attachment_list) subject=subject,
msg=message,
attachment_list=attachment_list)
# Future implemetation could consist in implementing # Future implemetation could consist in implementing
# policies such as grouped notification (per hour, per day, # policies such as grouped notification (per hour, per day,
......
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