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

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

[elpa] master fe319a7 101/187: * smtpmail-async.el (async-smtpmail-befor


From: Michael Albinus
Subject: [elpa] master fe319a7 101/187: * smtpmail-async.el (async-smtpmail-before-send-hook): New hook that run on child emacs before sending.
Date: Wed, 30 Dec 2015 11:49:57 +0000

branch: master
commit fe319a75a16bdc9a43175ed39f4ba233faf08a97
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    * smtpmail-async.el (async-smtpmail-before-send-hook): New hook that run on 
child emacs before sending.
---
 smtpmail-async.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/smtpmail-async.el b/smtpmail-async.el
index 76a9fb5..c5a9fac 100644
--- a/smtpmail-async.el
+++ b/smtpmail-async.el
@@ -41,6 +41,8 @@
 (require 'async)
 (require 'smtpmail)
 
+(defvar async-smtpmail-before-send-hook nil)
+
 (defun async-smtpmail-send-it ()
   (let ((to          (message-field-value "To"))
         (buf-content (buffer-substring-no-properties
@@ -54,8 +56,9 @@
           (set-buffer-multibyte nil)
           ;; Pass in the variable environment for smtpmail
           ,(async-inject-variables
-            "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-"
+            "\\`\\(smtpmail\\|async-smtpmail\\|\\(user-\\)?mail\\)-"
             nil 
"\\`\\(mail-header-format-function\\|smtpmail-address-buffer\\|mail-mode-abbrev-table\\)")
+          (run-hooks 'async-smtpmail-before-send-hook)
           (smtpmail-send-it)))
      `(lambda (&optional ignore)
         (message "Delivering message to %s...done" ,to)))))



reply via email to

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