source: WAeUP_SRP/trunk/skins/waeup_default/mail2admin.py @ 878

Last change on this file since 878 was 869, checked in by Henrik Bettermann, 18 years ago

comments field removed in mail form
admission slip shown in objection_raised_view

  • Property svn:keywords set to Id
File size: 1.0 KB
RevLine 
[819]1## Script (Python) "mail2admin"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
[823]7##parameters=fullname=None,regno=None,email=None,probtype=None,descr=None,commt=None
[819]8##title=
9##
[830]10# $Id: mail2admin.py 869 2006-11-15 13:46:49Z henrik $
[819]11
12mhost = context.MailHost
13prop = context.portal_properties
14
15# the message format, %s will be filled in from data
[820]16
[819]17message = """
[822]18From: %s <%s>
[819]19To: %s
[830]20Bcc: %s
[822]21Reply-To: %s
[864]22Subject: Uniben Contact: %s
[819]23
[820]24Fullname: %s
[825]25Member ID: %s
[820]26Problem Type: %s
27Description: %s
[819]28"""
29
[822]30#prop.email_from_address should be used for To:
31
[819]32msg = message % (
[822]33     fullname,
34     email,
[830]35     prop.email_from_address,
[820]36     'henrik@waeup.org',
[830]37#    'js@aixtraware.de',
[822]38     email,
[864]39     probtype,
[820]40     fullname,
[823]41     regno,
[820]42     probtype,
43     descr,
[819]44     )
[830]45mhost.send(msg)
46
47REQUEST = context.REQUEST
48RESPONSE = REQUEST.RESPONSE
49
50redirect_url = REQUEST.HTTP_REFERER
51redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
[864]52RESPONSE.redirect(redirect_url)
Note: See TracBrowser for help on using the repository browser.