Last change
on this file since 913 was
891,
checked in by Henrik Bettermann, 18 years ago
|
contact forms and methods renamed
contact_student_form and method for clearance officer added
clearance_edit swept
some psm edited
Is clearance_view.pt still necessary?
|
-
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 891 2006-11-18 20:59:12Z henrik $
|
---|
11 |
|
---|
12 | mhost = context.MailHost
|
---|
13 | prop = context.portal_properties
|
---|
14 |
|
---|
15 | # the message format, %s will be filled in from data
|
---|
16 |
|
---|
17 | message = """
|
---|
18 | From: %s <%s>
|
---|
19 | To: %s
|
---|
20 | Cc: %s
|
---|
21 | Bcc: %s
|
---|
22 | Reply-To: %s
|
---|
23 | Subject: Uniben Contact: %s
|
---|
24 |
|
---|
25 | Fullname: %s
|
---|
26 | Member ID: %s
|
---|
27 | Problem Type: %s
|
---|
28 | Description: %s
|
---|
29 | """
|
---|
30 |
|
---|
31 | #prop.email_from_address should be used for To:
|
---|
32 |
|
---|
33 | msg = message % (
|
---|
34 | fullname,
|
---|
35 | email,
|
---|
36 | prop.email_from_address,
|
---|
37 | email,
|
---|
38 | 'henrik@waeup.org',
|
---|
39 | # 'js@aixtraware.de',
|
---|
40 | email,
|
---|
41 | probtype,
|
---|
42 | fullname,
|
---|
43 | regno,
|
---|
44 | probtype,
|
---|
45 | descr,
|
---|
46 | )
|
---|
47 | mhost.send(msg)
|
---|
48 |
|
---|
49 | REQUEST = context.REQUEST
|
---|
50 | RESPONSE = REQUEST.RESPONSE
|
---|
51 |
|
---|
52 | redirect_url = REQUEST.HTTP_REFERER
|
---|
53 | redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
|
---|
54 | RESPONSE.redirect(redirect_url) |
---|
Note: See
TracBrowser for help on using the repository browser.