emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 66610f4 026/187: smtpmail-async: Report status to user whe


From: Michael Albinus
Subject: [elpa] master 66610f4 026/187: smtpmail-async: Report status to user when done
Date: Wed, 30 Dec 2015 11:49:29 +0000

branch: master
commit 66610f4a1de92f9177cf683155a21f0677523bf0
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>

    smtpmail-async: Report status to user when done
---
 smtpmail-async.el |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]