branch: master
commit 66610f4a1de92f9177cf683155a21f0677523bf0
Author: John Wiegley <[email protected]>
Commit: John Wiegley <[email protected]>
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)