mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Ticket #45.
This commit is contained in:
+2
-11
@@ -187,18 +187,9 @@ class Email(object):
|
||||
return map[m.group(1)]
|
||||
return url
|
||||
|
||||
def render_headers(self, folder, mail_id):
|
||||
attachments = []
|
||||
for part in self.attachments:
|
||||
decoded = decode_header(part.get_filename())
|
||||
if decoded[0][1] is None:
|
||||
attachments += [decoded[0][0]]
|
||||
else:
|
||||
attachments += [unicode(decoded[0][0], decoded[0][1])]
|
||||
return render_to_string("webmail/headers.html", {
|
||||
def render_headers(self, **kwargs):
|
||||
return render_to_string("common/mailheaders.html", {
|
||||
"headers" : self.headers,
|
||||
"folder" : folder, "mail_id" : mail_id,
|
||||
"attachments" : attachments != [] and attachments or None
|
||||
})
|
||||
|
||||
def render(self, request):
|
||||
|
||||
Reference in New Issue
Block a user