branch: master
commit b67254ce808acb9c0548cc8c35f5c613abe3934c
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    * smtpmail-async.el (async-smtpmail-send-it): Eval content of buffer 
outside temp buffer.(attempt to fix issue in mu4e)
---
 smtpmail-async.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/smtpmail-async.el b/smtpmail-async.el
index 467c200..b1a132c 100644
--- a/smtpmail-async.el
+++ b/smtpmail-async.el
@@ -42,13 +42,15 @@
 (require 'smtpmail)
 
 (defun async-smtpmail-send-it ()
-  (let ((to (message-field-value "To")))
+  (let ((to          (message-field-value "To"))
+        (buf-content (buffer-substring-no-properties
+                      (point-min) (point-max))))
     (message "Delivering message to %s..." to)
     (async-start
      `(lambda ()
         (require 'smtpmail)
         (with-temp-buffer
-          (insert ,(buffer-substring-no-properties (point-min) (point-max)))
+          (insert ,buf-content)
           ;; Pass in the variable environment for smtpmail
           ,(async-inject-variables "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-")
           (smtpmail-send-it)))

Reply via email to