Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7357)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7358)
@@ -50,5 +50,5 @@
     ILocalRolesAssignable, DuplicationError, IConfigurationContainer,
     ISessionConfiguration, ISessionConfigurationAdd,
-    IPasswordValidator, IContactForm)
+    IPasswordValidator, IContactForm, ISIRPUtils)
 from waeup.sirp.permissions import get_users_with_local_roles, get_all_roles
 from waeup.sirp.students.catalog import search as searchstudents
@@ -58,5 +58,5 @@
 from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
 from waeup.sirp.authentication import get_principal_role_manager
-from waeup.sirp.utils.helpers import get_user_account, send_mail
+from waeup.sirp.utils.helpers import get_user_account
 from waeup.sirp.browser.layout import jsaction, JSAction
 
@@ -228,6 +228,7 @@
         email_to = self.config.email_admin
         subject = self.config.email_subject
-        success = send_mail(fullname,username,usertype,self.config.name,
-                  body,email_from,email_to,subject)
+        sirp_utils = getUtility(ISIRPUtils)
+        success = sirp_utils.sendMail(fullname,username,usertype,
+                  self.config.name,body,email_from,email_to,subject)
         if success:
             self.flash('Your message has been sent.')
@@ -252,6 +253,7 @@
         subject = self.config.email_subject
         usertype = u'Anonymous'
-        success = send_mail(fullname,username,usertype,self.config.name,
-                  body,email_from,email_to,subject)
+        sirp_utils = getUtility(ISIRPUtils)
+        success = sirp_utils.sendMail(fullname,username,usertype,
+                  self.config.name,body,email_from,email_to,subject)
         if success:
             self.flash('Your message has been sent.')
@@ -476,6 +478,7 @@
         email_to = self.context.email
         subject = self.config.email_subject
-        success = send_mail(fullname,username,usertype,self.config.name,
-                  body,email_from,email_to,subject)
+        sirp_utils = getUtility(ISIRPUtils)
+        success = sirp_utils.sendMail(fullname,username,usertype,
+                  self.config.name,body,email_from,email_to,subject)
         if success:
             self.flash('Your message has been sent.')
Index: /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 7357)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 7358)
@@ -140,4 +140,11 @@
         return value
 
+class ISIRPUtils(Interface):
+    """A collection of methods which are subject to customization.
+    """
+    def sendMail(fullname,username,usertype,portal,body,email_from,email_to,subject):
+        """Send an email with data provided by forms.
+        """
+
 class ISIRPObject(Interface):
     """A SIRP object.
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7357)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7358)
@@ -40,5 +40,6 @@
 from waeup.sirp.browser.layout import jsaction, JSAction
 from waeup.sirp.interfaces import (
-    ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm)
+    ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
+    ISIRPUtils)
 from waeup.sirp.widgets.datewidget import (
     FriendlyDateWidget, FriendlyDateDisplayWidget,
@@ -60,5 +61,4 @@
 from waeup.sirp.applicants.interfaces import IApplicantBaseData
 from waeup.sirp.hostels.hostel import NOT_OCCUPIED
-from waeup.sirp.utils.helpers import send_mail
 
 def write_log_message(view, message):
@@ -393,5 +393,6 @@
         subject = data['subject']
         email_to = self.context.email
-        success = send_mail(fullname,username,usertype,self.config.name,
+        sirp_utils = getUtility(ISIRPUtils)
+        success = sirp_utils.sendMail(fullname,username,usertype,self.config.name,
                   body,email_from,email_to,subject)
         if success:
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7357)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7358)
@@ -16,5 +16,5 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##
-"""General helper functions for the student section.
+"""General helper functions and utilities for the student section.
 """
 import grok
Index: /main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py	(revision 7357)
+++ /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
