Skip to content

Commit

Permalink
Expect it is safe to remove sendto, and permissions are moved to conf…
Browse files Browse the repository at this point in the history
…igure.zcml
  • Loading branch information
Bo Simonsen committed Feb 13, 2014
1 parent 0d7aca7 commit 53c0458
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions Products/CMFPlone/PloneTool.py
Expand Up @@ -49,9 +49,6 @@
import LinkIntegrityNotificationException


AllowSendto = 'Allow sendto'
permissions.setDefaultRoles(AllowSendto, ('Anonymous', 'Manager', ))

_marker = utils._marker
_icons = {}

Expand Down Expand Up @@ -163,27 +160,6 @@ def getMailHost(self):
"""
return getattr(aq_parent(self), 'MailHost')

security.declareProtected(AllowSendto, 'sendto')
def sendto(self, send_to_address, send_from_address, comment,
subject='Plone', **kwargs):
# Sends a link of a page to someone.
host = self.getMailHost()
template = getattr(self, 'sendto_template')
portal = getToolByName(self, 'portal_url').getPortalObject()
encoding = portal.getProperty('email_charset')
if 'envelope_from' in kwargs:
envelope_from = kwargs['envelope_from']
else:
envelope_from = send_from_address
# Cook from template
message = template(self, send_to_address=send_to_address,
send_from_address=send_from_address,
comment=comment, subject=subject, **kwargs)
message = message.encode(encoding)
host.send(message, mto=send_to_address,
mfrom=envelope_from, subject=subject,
charset='utf-8')

security.declarePublic('validateSingleNormalizedEmailAddress')
def validateSingleNormalizedEmailAddress(self, address):
"""Lower-level function to validate a single normalized email address,
Expand Down

0 comments on commit 53c0458

Please sign in to comment.