Last change
on this file since 821 was
820,
checked in by Henrik Bettermann, 19 years ago
|
contact form finished
|
File size:
832 bytes
|
Rev | Line | |
---|
[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
|
---|
[820] | 7 | ##parameters=fullname=None,studentid=None,email=None,probtype=None,descr=None,commt=None
|
---|
[819] | 8 | ##title=
|
---|
| 9 | ##
|
---|
[820] | 10 | # $Id: mai2admin.py 805 2006-11-09 09:38:29Z henrik $
|
---|
[819] | 11 |
|
---|
| 12 | mhost = context.MailHost
|
---|
| 13 | prop = context.portal_properties
|
---|
| 14 |
|
---|
| 15 | # the message format, %s will be filled in from data
|
---|
[820] | 16 |
|
---|
[819] | 17 | message = """
|
---|
| 18 | From: %s
|
---|
| 19 | To: %s
|
---|
[820] | 20 | Bcc: %s
|
---|
[819] | 21 | Subject: Test Email from a Student
|
---|
| 22 |
|
---|
[820] | 23 | Fullname: %s
|
---|
| 24 | Student ID: %s
|
---|
| 25 | Email: %s
|
---|
| 26 | Problem Type: %s
|
---|
| 27 | Description: %s
|
---|
| 28 | Comment: %s
|
---|
[819] | 29 | """
|
---|
| 30 |
|
---|
| 31 | msg = message % (
|
---|
| 32 | prop.email_from_address,
|
---|
[820] | 33 | 'henrik@saoas.org',
|
---|
| 34 | 'henrik@waeup.org',
|
---|
| 35 | fullname,
|
---|
| 36 | studentid,
|
---|
| 37 | email,
|
---|
| 38 | probtype,
|
---|
| 39 | descr,
|
---|
| 40 | commt,
|
---|
[819] | 41 | )
|
---|
[820] | 42 | mhost.send(msg)
|
---|
| 43 |
|
---|
Note: See
TracBrowser for help on using the repository browser.