Last change
on this file since 4957 was
3709,
checked in by Henrik Bettermann, 16 years ago
|
- implement uniben skins, use waeup_custom skin only for default
|
File size:
1.0 KB
|
Rev | Line | |
---|
[3690] | 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 2334 2007-10-09 15:01:36Z henrik $
|
---|
| 11 |
|
---|
| 12 | mhost = context.MailHost
|
---|
| 13 | prop = context.portal_properties
|
---|
| 14 |
|
---|
| 15 | d = {}
|
---|
| 16 | d['fullname'] = fullname
|
---|
| 17 | d['email'] = email
|
---|
| 18 | d['email_from'] = prop.email_from_address
|
---|
| 19 | d['regno'] = regno
|
---|
| 20 | d['probtype'] = probtype
|
---|
| 21 | d['descr'] = descr
|
---|
| 22 |
|
---|
| 23 | message = """
|
---|
| 24 | From: %(fullname)s <%(email)s>
|
---|
| 25 | To: %(email_from)s
|
---|
| 26 | Cc: %(email)s
|
---|
| 27 | Bcc: waeup@saoas.org
|
---|
| 28 | Reply-To: %(email)s
|
---|
[3709] | 29 | Subject: Contact
|
---|
[3690] | 30 |
|
---|
| 31 | Fullname: %(fullname)s
|
---|
| 32 | Member ID: %(regno)s
|
---|
| 33 | Problem Type: %(probtype)s
|
---|
| 34 | Description: %(descr)s
|
---|
| 35 | """
|
---|
| 36 |
|
---|
| 37 | mhost.send(message % d)
|
---|
| 38 |
|
---|
| 39 | REQUEST = context.REQUEST
|
---|
| 40 | RESPONSE = REQUEST.RESPONSE
|
---|
| 41 |
|
---|
| 42 | redirect_url = REQUEST.HTTP_REFERER
|
---|
| 43 | redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
|
---|
| 44 | RESPONSE.redirect(redirect_url) |
---|
Note: See
TracBrowser for help on using the repository browser.