[Erp5-report] r16399 - /erp5/trunk/products/ERP5/Document/EmailDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 17 02:33:27 CEST 2007
Author: jp
Date: Mon Sep 17 02:33:26 2007
New Revision: 16399
URL: http://svn.erp5.org?rev=16399&view=rev
Log:
Use activities to keep transactions.
Modified:
erp5/trunk/products/ERP5/Document/EmailDocument.py
Modified: erp5/trunk/products/ERP5/Document/EmailDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/EmailDocument.py?rev=16399&r1=16398&r2=16399&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/EmailDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/EmailDocument.py Mon Sep 17 02:33:26 2007
@@ -411,7 +411,15 @@
if download:
return message.as_string() # Only for debugging purpose
- self.MailHost.send(message.as_string())
+ # Use activities
+ self.activate(activity="SQLQueue").sendMailHostMessage(message.as_string())
+
+ security.declareProtected(Permissions.UseMailhostServices, 'sendMailHostMessage')
+ def sendMailHostMessage(self, message):
+ """
+ Send one by one
+ """
+ self.MailHost.send(message)
## Compatibility layer
#from Products.ERP5Type import Document
More information about the Erp5-report
mailing list