diff --git a/themes/bootstrap/templates/mailbox/_show.html b/themes/bootstrap/templates/mailbox/_show.html
index 474e0cf..33a9975 100644
--- a/themes/bootstrap/templates/mailbox/_show.html
+++ b/themes/bootstrap/templates/mailbox/_show.html
@@ -67,10 +67,14 @@
-{{if .isTextFromHTML}}
+{{with .mimeErrors}}
-
Notice: Message did not contain a plain text portion;
- the text below was converted from HTML automatically.
+
Notice: MIME parsing
Warnings and/or
Errors were encountered
+
+ {{range $i, $err := .}}
+ - {{$err}}
+ {{end}}
+
{{end}}
diff --git a/webui/mailbox_controller.go b/webui/mailbox_controller.go
index cadb226..de56540 100644
--- a/webui/mailbox_controller.go
+++ b/webui/mailbox_controller.go
@@ -180,13 +180,13 @@ func MailboxShow(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) (
htmlAvailable := mime.HTML != ""
return httpd.RenderPartial("mailbox/_show.html", w, map[string]interface{}{
- "ctx": ctx,
- "name": name,
- "message": msg,
- "body": body,
- "htmlAvailable": htmlAvailable,
- "isTextFromHTML": mime.IsTextFromHTML,
- "attachments": mime.Attachments,
+ "ctx": ctx,
+ "name": name,
+ "message": msg,
+ "body": body,
+ "htmlAvailable": htmlAvailable,
+ "mimeErrors": mime.Errors,
+ "attachments": mime.Attachments,
})
}
@@ -386,7 +386,7 @@ func MailboxViewAttach(w http.ResponseWriter, req *http.Request, ctx *httpd.Cont
}
part := body.Attachments[num]
- w.Header().Set("Content-Type", part.ContentType())
+ w.Header().Set("Content-Type", part.ContentType)
if _, err := io.Copy(w, part); err != nil {
return err
}