Merge pull request #1386 from davidcsterratt/master

Issue #1385: get mu4e-action-view-in-browser to show headers
This commit is contained in:
Dirk-Jan C. Binnema 2019-04-13 12:36:39 +03:00 committed by GitHub
commit a90fe78f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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