From 3a1e6a3c3aa07a030edcc7a9bb75b4b153c07e59 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 12 Jun 2014 14:40:32 -0400 Subject: [PATCH] fix semi-backend bug in org-mime * contrib/lisp/org-mime.el (org-mime-multipart): Fix bug in use of the semi org-mime-library when converting emails to HTML. --- contrib/lisp/org-mime.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el index 5f874d932..44bf91ba0 100644 --- a/contrib/lisp/org-mime.el +++ b/contrib/lisp/org-mime.el @@ -163,10 +163,13 @@ and images in a multipart/related part." ('semi (concat "--" "<>-{\n" "--" "[[text/plain]]\n" plain - (when images (concat "--" "<>-{\n")) - "--" "[[text/html]]\n" html - images - (when images (concat "--" "}-<>\n")) + (if (and images (> (length images) 0)) + (concat "--" "<>-{\n" + "--" "[[text/html]]\n" html + images + "--" "}-<>\n") + (concat "--" "[[text/html]]\n" html + images)) "--" "}-<>\n")) ('vm "?")))