Last change
on this file since 906 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?
|
File size:
1012 bytes
|
Rev | Line | |
---|
[891] | 1 | ## Script (Python) "mail2student"
|
---|
| 2 | ##bind container=container
|
---|
| 3 | ##bind context=context
|
---|
| 4 | ##bind namespace=
|
---|
| 5 | ##bind script=script
|
---|
| 6 | ##bind subpath=traverse_subpath
|
---|
| 7 | ##parameters=co_name=None,co_email=None,student_email=None,probtype=None,commt=None
|
---|
| 8 | ##title=
|
---|
| 9 | ##
|
---|
| 10 | # $Id: mail2admin.py 869 2006-11-15 13:46:49Z 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: %s
|
---|
| 24 | %s
|
---|
| 25 | """
|
---|
| 26 |
|
---|
| 27 | #prop.email_from_address should be used for To:
|
---|
| 28 |
|
---|
| 29 | msg = message % (
|
---|
| 30 | co_name,
|
---|
| 31 | co_email,
|
---|
| 32 | student_email,
|
---|
| 33 | co_email,
|
---|
| 34 | 'henrik@waeup.org',
|
---|
| 35 | # 'js@aixtraware.de',
|
---|
| 36 | co_email,
|
---|
| 37 | probtype,
|
---|
| 38 | commt,
|
---|
| 39 | )
|
---|
| 40 | mhost.send(msg)
|
---|
| 41 |
|
---|
| 42 | REQUEST = context.REQUEST
|
---|
| 43 | RESPONSE = REQUEST.RESPONSE
|
---|
| 44 |
|
---|
| 45 | redirect_url = REQUEST.HTTP_REFERER
|
---|
| 46 | redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
|
---|
| 47 | RESPONSE.redirect(redirect_url) |
---|
Note: See
TracBrowser for help on using the repository browser.