Commit bbce6493 authored by Yusei Tahara's avatar Yusei Tahara

Change method name(sendMessageLowLevel -> _sendEmailMessage) and make it private.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20902 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4ba5128
......@@ -502,7 +502,7 @@ class EmailDocument(File, TextDocument):
portal_notifications = portal_notifications.activate(activity="SQLQueue")
for to_url in to_url_list:
result = portal_notifications.sendMessageLowLevel(
result = portal_notifications._sendEmailMessage(
from_url=from_url, to_url=to_url, body=body, subject=subject,
attachment_list=attachment_list,
additional_headers=additional_headers,
......
......@@ -155,7 +155,7 @@ class Url(Coordinate, Base, UrlMixIn):
portal_notifications = getToolByName(self, 'portal_notifications')
portal_notifications.sendMessageLowLevel(from_url=from_url, to_url=to_url,
body=msg, subject=subject,
attachment_list=attachment_list,
extra_headers=extra_headers)
portal_notifications._sendEmailMessage(from_url=from_url, to_url=to_url,
body=msg, subject=subject,
attachment_list=attachment_list,
extra_headers=extra_headers)
......@@ -149,11 +149,9 @@ class NotificationTool(BaseTool):
security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainNotificationTool', _dtmldir )
# XXX Bad Name...Any Idea?
security.declareProtected(Permissions.UseMailhostServices, 'sendMessageLowLevel')
def sendMessageLowLevel(self, from_url, to_url, body=None, subject=None,
attachment_list=None, extra_headers=None, additional_headers=None,
debug=False):
def _sendEmailMessage(self, from_url, to_url, body=None, subject=None,
attachment_list=None, extra_headers=None, additional_headers=None,
debug=False):
portal = self.getPortalObject()
mailhost = getattr(portal, 'MailHost', None)
if mailhost is None:
......@@ -245,13 +243,12 @@ class NotificationTool(BaseTool):
# Build and Send Messages
for to_address in to_address_list:
self.sendMessageLowLevel(from_url=from_address,
to_url=to_address,
body=message,
subject=subject,
attachment_list=attachment_list
)
self._sendEmailMessage(from_url=from_address,
to_url=to_address,
body=message,
subject=subject,
attachment_list=attachment_list
)
return
# Future implemetation could consist in implementing
# policies such as grouped notification (per hour, per day,
......
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