source: WAeUP_SRP/branches/joachim-event-branch/skins/waeup_default/mail2admin.py @ 17415

Last change on this file since 17415 was 1669, checked in by joachim, 18 years ago

merged up to 1664

  • Property svn:keywords set to Id
File size: 1.1 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 1669 2007-04-04 06:31:52Z joachim $
[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
[976]20Cc: %s, %s
[830]21Bcc: %s
[822]22Reply-To: %s
[976]23Subject: Uniben Contact
[819]24
[820]25Fullname: %s
[825]26Member ID: %s
[820]27Problem Type: %s
28Description: %s
[819]29"""
30
[822]31#prop.email_from_address should be used for To:
32
[819]33msg = message % (
[822]34     fullname,
35     email,
[830]36     prop.email_from_address,
[891]37     email,
[976]38     'kehindesamuel@waeup.org',
[1669]39     'waeup@saoas.org',
[830]40#    'js@aixtraware.de',
[822]41     email,
[820]42     fullname,
[823]43     regno,
[820]44     probtype,
45     descr,
[819]46     )
[830]47mhost.send(msg)
48
49REQUEST = context.REQUEST
50RESPONSE = REQUEST.RESPONSE
51
52redirect_url = REQUEST.HTTP_REFERER
53redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
[864]54RESPONSE.redirect(redirect_url)
Note: See TracBrowser for help on using the repository browser.