[Erp5-report] r19204 - /erp5/trunk/products/ERP5/Tool/NotificationTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Feb 9 15:16:06 CET 2008
Author: jp
Date: Sat Feb 9 15:16:06 2008
New Revision: 19204
URL: http://svn.erp5.org?rev=19204&view=rev
Log:
Improved usage of portal default properties for from email and to email. Some space added for better syntax.
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=19204&r1=19203&r2=19204&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/NotificationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/NotificationTool.py Sat Feb 9 15:16:06 2008
@@ -165,7 +165,8 @@
# Default Values
portal = self.getPortalObject()
- default_email = portal.email_from_address
+ default_from_email = portal.email_from_address
+ default_to_email = portal.email_to_address
# Change all strings to object values
if isinstance(sender, basestring):
@@ -179,7 +180,7 @@
if not email_from_address:
# If we can not find a from address then
# we fallback to default values
- email_from_address = default_email
+ email_from_address = default_from_email
# To is a list - let us find all members
if not isinstance(recipient, (list, tuple)):
@@ -191,10 +192,10 @@
mailhost = getattr(self.getPortalObject(), 'MailHost', None)
if mailhost is None:
raise AttributeError, "Cannot find a MailHost object"
- mail_message = buildEmailMessage(email_from_address, default_email,
+ mail_message = buildEmailMessage(email_from_address, default_to_email,
msg=message, subject=subject,
attachment_list=attachment_list)
- return mailhost.send(mail_message.as_string(), default_email, email_from_address)
+ return mailhost.send(mail_message.as_string(), default_to_email, email_from_address)
# Default implementation is to send an active message to everyone
for person in recipient:
More information about the Erp5-report
mailing list