source: WAeUP_SRP/branches/uli/skins/waeup_default/mail2admin.py @ 17935

Last change on this file since 17935 was 1653, checked in by uli, 18 years ago

Incorporated changeset 1593:1652 of trunk into uli-branch.

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1## Script (Python) "mail2admin"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=fullname=None,regno=None,email=None,probtype=None,descr=None,commt=None
8##title=
9##
10# $Id: mail2admin.py 1653 2007-03-28 02:35:25Z uli $
11
12mhost = context.MailHost
13prop = context.portal_properties
14
15# the message format, %s will be filled in from data
16
17message = """
18From: %s <%s>
19To: %s
20Cc: %s, %s
21Bcc: %s
22Reply-To: %s
23Subject: Uniben Contact
24
25Fullname: %s
26Member ID: %s
27Problem Type: %s
28Description: %s
29"""
30
31#prop.email_from_address should be used for To:
32
33msg = message % (
34     fullname,
35     email,
36     prop.email_from_address,
37     email,
38     'kehindesamuel@waeup.org',
39     'waeup@saoas.org',
40#    'js@aixtraware.de',
41     email,
42     fullname,
43     regno,
44     probtype,
45     descr,
46     )
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!')
54RESPONSE.redirect(redirect_url)
Note: See TracBrowser for help on using the repository browser.