## 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 2334 2007-10-09 15:01:36Z henrik $ mhost = context.MailHost prop = context.portal_properties d = {} d['fullname'] = fullname d['email'] = email d['email_from'] = prop.email_from_address d['regno'] = regno d['probtype'] = probtype d['descr'] = descr message = """ From: %(fullname)s <%(email)s> To: %(email_from)s Cc: %(email)s Reply-To: %(email)s Subject: AAUA Contact Fullname: %(fullname)s Member ID: %(regno)s Problem Type: %(probtype)s Description: %(descr)s """ mhost.send(message % d) 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)