Issue #1385: get mu4e-action-view-in-browser to show headers

Here is a very simple patch that achieves what I want, though I am
sure there are nicer ways of doing it.
This commit is contained in:
David C Sterratt 2019-02-20 18:17:53 +00:00
parent 9bffb465bd
commit 0348822381
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ return the filename."
(mu4e-error "No body part for this message"))
(with-temp-buffer
(insert "<head><meta charset=\"UTF-8\"></head>\n")
(insert (concat "<p><strong>From</strong>: " (mu4e-html-construct-contacts-header msg :from) "</br>"))
(insert (concat "<strong>To</strong>: " (mu4e-html-construct-contacts-header msg :to) "</br>"))
(insert (concat "<strong>Date</strong>: " (format-time-string mu4e-view-date-format (mu4e-message-field msg :date)) "</br>"))
(insert (concat "<strong>Subject</strong>: " (mu4e-message-field msg :subject) "</p>"))
(insert (or html (concat "<pre>" txt "</pre>")))
(write-file tmpfile)
;; rewrite attachment urls