Commit d68d440c authored by Yusei Tahara's avatar Yusei Tahara

If it fails to activate self, call MailHost.send directly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bd7c3ae5
......@@ -507,7 +507,11 @@ class EmailDocument(File, TextDocument):
attachment_list=attachment_list,
additional_headers=additional_headers)
mail_message = mime_message.as_string()
try:
self.activate(activity='SQLQueue').sendMailHostMessage(mail_message)
except TypeError:
# temporary document does not support activation.
self.MailHost.send(mail_message)
# Save one of mail messages.
self.setData(mail_message)
......
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