From 6a2db1429081a7b4c002ff38902c7c7b2377b514 Mon Sep 17 00:00:00 2001 From: Charl Botha Date: Wed, 28 Jan 2015 09:09:18 +0200 Subject: [PATCH] Fix org-mu4e bug with HTML in text/plain part When sending org mode mail, both the text/html and text/plain parts contained the HTML version of the mail, instead of just the text/html part. This patch puts the raw-body (org format) in the text part, and the html with replaced images in the html part. --- mu4e/org-mu4e.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mu4e/org-mu4e.el b/mu4e/org-mu4e.el index 06363d42..eca09118 100644 --- a/mu4e/org-mu4e.el +++ b/mu4e/org-mu4e.el @@ -196,7 +196,6 @@ and images in a multipart/related part." (raw-body (buffer-substring begin end)) (tmp-file (make-temp-name (expand-file-name "mail" temporary-file-directory))) - (body (org-export-string-as raw-body 'html t)) ;; because we probably don't want to skip part of our mail (org-export-skip-text-before-1st-heading nil) ;; because we probably don't want to export a huge style file @@ -217,7 +216,7 @@ and images in a multipart/related part." (goto-char begin) (newline) (insert (org~mu4e-mime-multipart - body html (mapconcat 'identity html-images "\n")))))) + raw-body html (mapconcat 'identity html-images "\n")))))) ;; next some functions to make the org/mu4e-compose-mode switch as smooth as ;; possible.