mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-17 09:46:08 +01:00
Ticket #48.
This is not finished yet. More work than what I expected but the main part is done. It will need a lot of testing... There is still a bug when activating a new extension in development mode (ie. with python web server), I think it does not occur behind a real web server.
This commit is contained in:
@@ -16,7 +16,6 @@ from mailng.lib import tables, imap_utf7, parameters
|
||||
class WMtable(tables.Table):
|
||||
tableid = "emails"
|
||||
idkey = "imapid"
|
||||
# selection = tables.SelectionColumn("selection", width="20px", first=True)
|
||||
_1_flags = tables.ImgColumn("flags", width="4%",
|
||||
header="<input type='checkbox' name='toggleselect' id='toggleselect' />")
|
||||
_2_subject = tables.Column("subject", label=_("Subject"),
|
||||
|
||||
@@ -34,6 +34,11 @@ def init():
|
||||
parameters.register("webmail", "SMTP_SECURED", "list_yesno", "no",
|
||||
help=_("Use a secured connection to access SMTP server"))
|
||||
|
||||
def destroy():
|
||||
events.unregister("UserMenuDisplay", menu)
|
||||
events.unregister("UserLogin", userlogin)
|
||||
parameters.unregister_app("webmail")
|
||||
|
||||
def infos():
|
||||
return {
|
||||
"name" : "Webmail",
|
||||
@@ -139,14 +144,12 @@ def viewmail(request, folder, mail_id=None):
|
||||
def getmailcontent(request, folder, mail_id):
|
||||
msg = fetchmail(request, folder, mail_id, True)
|
||||
if "class" in msg.keys() and msg["class"] == "unseen":
|
||||
#IMAPconnector(request).msg_read(*msg["imapid"].split("/"))
|
||||
IMAPconnector(request).msg_read(folder, mail_id)
|
||||
email = ImapEmail(msg, mode="html", links="1")
|
||||
try:
|
||||
pageid = request.session["page"]
|
||||
except KeyError:
|
||||
pageid = "1"
|
||||
#folder, imapid = msg["imapid"].split("/")
|
||||
return _render(request, "common/viewmail.html", {
|
||||
"headers" : email.render_headers(folder, mail_id),
|
||||
"folder" : folder, "imapid" : mail_id, "mailbody" : email.body,
|
||||
|
||||
Reference in New Issue
Block a user