|
Revision 3, 363 bytes
(checked in by davea, 3 years ago)
|
re-jig to use mod_python instead of CGI. now does proper authentication, meaning anyone with a valid IMAP account can login
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
import webmail |
|---|
| 2 |
|
|---|
| 3 |
def index(req): |
|---|
| 4 |
req.content_type = "text/html" |
|---|
| 5 |
passwd = req.get_basic_auth_pw() |
|---|
| 6 |
user = req.user |
|---|
| 7 |
wm = webmail.Webmail(user, passwd, req) |
|---|
| 8 |
|
|---|
| 9 |
if req.form.has_key("function"): |
|---|
| 10 |
action = req.form['function'].value |
|---|
| 11 |
if action == "load_msg": |
|---|
| 12 |
wm.set_folder(req.form['folder'].value) |
|---|
| 13 |
return wm.get_message(req.form['id'].value) |
|---|