## Script (Python) "mail2admin" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=fullname=None,studentid=None,email=None,probtype=None,descr=None,commt=None ##title= ## # $Id: mai2admin.py 805 2006-11-09 09:38:29Z henrik $ mhost = context.MailHost prop = context.portal_properties # the message format, %s will be filled in from data message = """ From: %s To: %s Bcc: %s Subject: Test Email from a Student Fullname: %s Student ID: %s Email: %s Problem Type: %s Description: %s Comment: %s """ msg = message % ( prop.email_from_address, 'henrik@saoas.org', 'henrik@waeup.org', fullname, studentid, email, probtype, descr, commt, ) mhost.send(msg)