1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Track enmime API changes

- Part accessors: 196b2ad725
- IsTextFromHTML: 2bd44ac6cc
This commit is contained in:
James Hillyerd
2016-11-21 22:32:29 -08:00
parent 26a9903492
commit 364e7a0b80
2 changed files with 15 additions and 11 deletions

View File

@@ -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
}