Ignore:
Timestamp:
16 Dec 2011, 07:13:28 (13 years ago)
Author:
Henrik Bettermann
Message:

Seat up a global utility class to ease customization. Transform send_mail function into a utility method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7357 r7358  
    4040from waeup.sirp.browser.layout import jsaction, JSAction
    4141from waeup.sirp.interfaces import (
    42     ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm)
     42    ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
     43    ISIRPUtils)
    4344from waeup.sirp.widgets.datewidget import (
    4445    FriendlyDateWidget, FriendlyDateDisplayWidget,
     
    6061from waeup.sirp.applicants.interfaces import IApplicantBaseData
    6162from waeup.sirp.hostels.hostel import NOT_OCCUPIED
    62 from waeup.sirp.utils.helpers import send_mail
    6363
    6464def write_log_message(view, message):
     
    393393        subject = data['subject']
    394394        email_to = self.context.email
    395         success = send_mail(fullname,username,usertype,self.config.name,
     395        sirp_utils = getUtility(ISIRPUtils)
     396        success = sirp_utils.sendMail(fullname,username,usertype,self.config.name,
    396397                  body,email_from,email_to,subject)
    397398        if success:
Note: See TracChangeset for help on using the changeset viewer.