## Script (Python) "mail2admin" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=fullname=None,regno=None,email=None,probtype=None,descr=None,commt=None ##title= ## # $Id: mail2admin.py 2271 2007-09-22 05:07:23Z henrik $ mhost = context.MailHost prop = context.portal_properties # the message format, %s will be filled in from data message = """ From: %s <%s> To: %s Cc: %s, %s Bcc: %s Reply-To: %s Subject: Uniben Contact Fullname: %s Member ID: %s Problem Type: %s Description: %s """ #prop.email_from_address should be used for To: msg = message % ( fullname, email, prop.email_from_address, email, 'henrik@waeup.org', # 'js@aixtraware.de', email, fullname, regno, probtype, descr, ) mhost.send(msg) REQUEST = context.REQUEST RESPONSE = REQUEST.RESPONSE redirect_url = REQUEST.HTTP_REFERER redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!') RESPONSE.redirect(redirect_url)