[Erp5-report] r28200 - /erp5/trunk/products/ERP5/Tool/NotificationTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 29 11:26:35 CEST 2009


Author: luke
Date: Wed Jul 29 11:26:34 2009
New Revision: 28200

URL: http://svn.erp5.org?rev=28200&view=rev
Log:
 - use nice From header fallback to send system messages

Modified:
    erp5/trunk/products/ERP5/Tool/NotificationTool.py

Modified: erp5/trunk/products/ERP5/Tool/NotificationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/NotificationTool.py?rev=28200&r1=28199&r2=28200&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/NotificationTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/NotificationTool.py [utf8] Wed Jul 29 11:26:34 2009
@@ -317,8 +317,12 @@
     default_from_email = portal.email_from_address
     default_to_email = getattr(portal, 'email_to_address',
                                default_from_email)
+    default_from_name = portal.title
+    default_from_name = getattr(portal, 'email_from_name', default_from_name)
     if from_person is None:
-      low_level_kw['from_url'] = default_from_email
+      # when sending without sender defined compose identifiable From header
+      low_level_kw['from_url'] = '%s <%s>' % (default_from_name,
+          default_from_email)
     if not to_person_list:
       low_level_kw['to_url'] = default_to_email
     if attachment_list is not None:




More information about the Erp5-report mailing list