Commit 14c5f927 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Revert "fix two regressions (support attachments, support sending to persons...

Revert "fix two regressions (support attachments, support sending to persons that are not yet indexed)."

This reverts commit 5d552ce8.
parent 00d5f022
......@@ -64,7 +64,6 @@ elif event.getSource() is not None:\n
from_url = formataddr((sender.getTitle(), sender.getDefaultEmailText()))\n
else:\n
from_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
attachment_list = kw.pop(\'attachment_list\', [])\n
\n
to_url = formataddr((context.getTitle(), context.getDefaultEmailText()))\n
\n
......@@ -77,7 +76,7 @@ mail_message = context.Base_createMailMessageAsString(from_url,\n
subject,\n
body,\n
content_type,\n
attachment_list=attachment_list,\n
attachment_list=[],\n
embedded_file_list=embedded_file_list)\n
\n
event.sendMailHostMessage(mail_message)\n
......
......@@ -54,8 +54,6 @@
from email import message_from_string\n
portal = context.getPortalObject()\n
\n
if attachment_list is None:\n
attachment_list = []\n
use_activity = False\n
mail_message = None\n
to_url_list = []\n
......@@ -97,6 +95,8 @@ if download or not use_activity:\n
additional_headers = {\'Return-Path\':reply_url}\n
\n
# Attachments\n
if attachment_list is None:\n
attachment_list = []\n
document_type_list = list(context.getPortalEmbeddedDocumentTypeList()) + list(context.getPortalDocumentTypeList())\n
embedded_file_list = context.getAggregateValueList(portal_type=document_type_list)\n
\n
......@@ -115,16 +115,10 @@ if download or not use_activity:\n
context.activate(activity=\'SQLQueue\').sendMailHostMessage(mail_message)\n
\n
if use_activity:\n
destination_list = context.getDestinationValueList()\n
path_list = [x.getPath() for x in destination_list]\n
uid_list = [x.getUid() for x in destination_list]\n
uid_list = context.getDestinationUidList()\n
method_kw = dict(event_relative_url=context.getRelativeUrl(),\n
from_url=from_url,\n
attachment_list=attachment_list)\n
portal.portal_catalog.activate(\n
after_path_and_method_id=(path_list, \n
(\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).searchAndActivate(\n
method_id="Entity_sendEmail",\n
from_url=from_url)\n
portal.portal_catalog.searchAndActivate(method_id="Entity_sendEmail",\n
uid=uid_list,\n
method_kw=method_kw, **kw)\n
\n
......
1024
\ No newline at end of file
1023
\ No newline at end of file
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