From b717a001d4a4b87a64c20f8286725507caa6190d Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 28 Feb 2013 23:00:06 +0100 Subject: [PATCH] [gen] added tool.sendMail as an easy access method for function appy.gen.mail.sendMail. --- gen/wrappers/ToolWrapper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen/wrappers/ToolWrapper.py b/gen/wrappers/ToolWrapper.py index 194cbf9..fe92e8c 100644 --- a/gen/wrappers/ToolWrapper.py +++ b/gen/wrappers/ToolWrapper.py @@ -1,6 +1,7 @@ # ------------------------------------------------------------------------------ import os.path, time import appy +from appy.gen.mail import sendMail from appy.shared.utils import executeCommand from appy.gen.wrappers import AbstractWrapper from appy.gen.installer import loggedUsers @@ -130,6 +131,10 @@ class ToolWrapper(AbstractWrapper): self.log('Executing %s...' % cmd) return executeCommand(cmd) # The result can contain an error message + def sendMail(self, to, subject, body, attachments=None): + '''Sends a mail. See doc for appy.gen.mail.sendMail.''' + sendMail(self, to, subject, body, attachments=attachments) + def refreshSecurity(self): '''Refreshes, on every object in the database, security-related, workflow-managed information.'''