Last change
on this file since 819 was
819,
checked in by Henrik Bettermann, 18 years ago
|
mail2admin for testing
|
File size:
532 bytes
|
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 | ##title=
|
---|
8 | ##
|
---|
9 |
|
---|
10 | # the objects we need
|
---|
11 | mship = context.portal_membership
|
---|
12 | mhost = context.MailHost
|
---|
13 | prop = context.portal_properties
|
---|
14 |
|
---|
15 | # the message format, %s will be filled in from data
|
---|
16 | message = """
|
---|
17 | From: %s
|
---|
18 | To: %s
|
---|
19 | Subject: Test Email from a Student
|
---|
20 |
|
---|
21 | Test
|
---|
22 | """
|
---|
23 |
|
---|
24 | msg = message % (
|
---|
25 | prop.email_from_address,
|
---|
26 | 'henrik@saoas.org',
|
---|
27 | )
|
---|
28 | mhost.send(msg) |
---|
Note: See
TracBrowser for help on using the repository browser.