Index: main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py	(revision 7321)
+++ main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py	(revision 7358)
@@ -480,27 +480,2 @@
     account = authenticator.getAccount(principal_id)
     return account
-
-def send_mail(fullname,username,usertype,portal,body,email_from,email_to,subject):
-    """Send an email with data provided by forms.
-    """
-    config = grok.getSite()['configuration']
-    text = """Fullname: %s
-User Id: %s
-User Type: %s
-Portal: %s
-
-%s
-"""
-    msg = MIMEText(text % (fullname,username,usertype,portal,body))
-    msg['From'] = '%s <%s>' % (fullname,email_from)
-    msg['To'] = email_to
-    msg['Subject'] = subject
-    server = smtplib.SMTP(config.smtp_server)
-    if config.smtp_requires_login:
-        server.login(config.smtp_username,config.smtp_password)
-    try:
-        server.sendmail(email_from,email_to,msg.as_string())
-    except:
-        return False
-    server.quit()
-    return True
Index: main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py	(revision 7358)
+++ main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py	(revision 7358)
@@ -0,0 +1,54 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""General helper utilities for SIRP.
+"""
+import grok
+import smtplib
+from email.mime.text import MIMEText
+from waeup.sirp.interfaces import ISIRPUtils
+
+class SIRPUtils(grok.GlobalUtility):
+    """A collection of methods subject to customization.
+    """
+    grok.implements(ISIRPUtils)
+
+    def sendMail(self,fullname,username,usertype,portal,body,
+                 email_from,email_to,subject):
+        """Send an email with data provided by forms.
+        """
+        config = grok.getSite()['configuration']
+        text = """Fullname: %s
+User Id: %s
+User Type: %s
+Portal: %s
+
+%s
+"""
+        msg = MIMEText(text % (fullname,username,usertype,portal,body))
+        msg['From'] = '%s <%s>' % (fullname,email_from)
+        msg['To'] = email_to
+        msg['Subject'] = subject
+        server = smtplib.SMTP(config.smtp_server)
+        if config.smtp_requires_login:
+            server.login(config.smtp_username,config.smtp_password)
+        try:
+            server.sendmail(email_from,email_to,msg.as_string())
+        except:
+            return False
+        server.quit()
+        return True
