Commit 31a7c2ff authored by Jean-Paul Smets's avatar Jean-Paul Smets

Use activities to keep transactions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16399 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0a795f8a
...@@ -411,7 +411,15 @@ class EmailDocument(File, TextDocument): ...@@ -411,7 +411,15 @@ class EmailDocument(File, TextDocument):
if download: if download:
return message.as_string() # Only for debugging purpose 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 ## Compatibility layer
#from Products.ERP5Type import Document #from Products.ERP5Type import Document
......
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