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): ...@@ -502,7 +502,7 @@ class EmailDocument(File, TextDocument):
portal_notifications = portal_notifications.activate(activity="SQLQueue") portal_notifications = portal_notifications.activate(activity="SQLQueue")
for to_url in to_url_list: 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, from_url=from_url, to_url=to_url, body=body, subject=subject,
attachment_list=attachment_list, attachment_list=attachment_list,
additional_headers=additional_headers, additional_headers=additional_headers,
......
...@@ -155,7 +155,7 @@ class Url(Coordinate, Base, UrlMixIn): ...@@ -155,7 +155,7 @@ class Url(Coordinate, Base, UrlMixIn):
portal_notifications = getToolByName(self, 'portal_notifications') portal_notifications = getToolByName(self, 'portal_notifications')
portal_notifications.sendMessageLowLevel(from_url=from_url, to_url=to_url, portal_notifications._sendEmailMessage(from_url=from_url, to_url=to_url,
body=msg, subject=subject, body=msg, subject=subject,
attachment_list=attachment_list, attachment_list=attachment_list,
extra_headers=extra_headers) extra_headers=extra_headers)
...@@ -149,9 +149,7 @@ class NotificationTool(BaseTool): ...@@ -149,9 +149,7 @@ class NotificationTool(BaseTool):
security.declareProtected( Permissions.ManagePortal, 'manage_overview' ) security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainNotificationTool', _dtmldir ) manage_overview = DTMLFile( 'explainNotificationTool', _dtmldir )
# XXX Bad Name...Any Idea? def _sendEmailMessage(self, from_url, to_url, body=None, subject=None,
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, attachment_list=None, extra_headers=None, additional_headers=None,
debug=False): debug=False):
portal = self.getPortalObject() portal = self.getPortalObject()
...@@ -245,13 +243,12 @@ class NotificationTool(BaseTool): ...@@ -245,13 +243,12 @@ class NotificationTool(BaseTool):
# Build and Send Messages # Build and Send Messages
for to_address in to_address_list: for to_address in to_address_list:
self.sendMessageLowLevel(from_url=from_address, self._sendEmailMessage(from_url=from_address,
to_url=to_address, to_url=to_address,
body=message, body=message,
subject=subject, subject=subject,
attachment_list=attachment_list attachment_list=attachment_list
) )
return return
# Future implemetation could consist in implementing # Future implemetation could consist in implementing
# policies such as grouped notification (per hour, per day, # 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