diff --git a/product/ERP5/Tool/NotificationTool.py b/product/ERP5/Tool/NotificationTool.py index c3dcb6b25af4e4cd3d461fe32ad1fb59a98ff695..c4b7d7085d390164b2a07987b65169a2d2f9c6ce 100644 --- a/product/ERP5/Tool/NotificationTool.py +++ b/product/ERP5/Tool/NotificationTool.py @@ -183,10 +183,6 @@ class NotificationTool(BaseTool): # we fallback to default values email_from_address = default_from_email - # To is a list - let us find all members - if not isinstance(recipient, (list, tuple)): - recipient = (recipient, ) - # If no recipient is defined, just send an email to the # default mail address defined at the CMF site root. if recipient is None: @@ -198,6 +194,10 @@ class NotificationTool(BaseTool): attachment_list=attachment_list) return mailhost.send(mail_message.as_string(), default_to_email, email_from_address) + elif not isinstance(recipient, (list, tuple)): + # To is a list - let us find all members + recipient = (recipient, ) + # Default implementation is to send an active message to everyone for person in recipient: if isinstance(person, basestring):