]> code.delx.au - gnu-emacs-elpa/blobdiff - smtpmail-async.el
Switch to lexical-binding.
[gnu-emacs-elpa] / smtpmail-async.el
index d7a8fa6e08aeaba0a23ada15724bf2d78729ca1b..0a65a98a36d200b9902303a27666c86cc59f4b1f 100644 (file)
@@ -1,6 +1,6 @@
-;;; smtpmail-async --- Send e-mail with smtpmail.el asynchronously
+;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012~2014 John Wiegley
+;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <jwiegley@gmail.com>
 ;; Created: 18 Jun 2012
 ;;
 ;; This assumes you already have smtpmail.el working.
 
+;;; Code:
+
 (defgroup smtpmail-async nil
   "Send e-mail with smtpmail.el asynchronously"
   :group 'smptmail)
 
 (require 'async)
 (require 'smtpmail)
+(require 'message)
 
 (defvar async-smtpmail-before-send-hook nil
   "Hook running in the child emacs in `async-smtpmail-send-it'.
@@ -58,7 +61,7 @@ It is called just before calling `smtpmail-send-it'.")
           (set-buffer-multibyte nil)
           ;; Pass in the variable environment for smtpmail
           ,(async-inject-variables
-            "\\`\\(smtpmail\\|async-smtpmail\\|\\(user-\\)?mail\\)-\\|auth-sources"
+            "\\`\\(smtpmail\\|async-smtpmail\\|\\(user-\\)?mail\\)-\\|auth-sources\\|epg"
             nil "\\`\\(mail-header-format-function\\|smtpmail-address-buffer\\|mail-mode-abbrev-table\\)")
           (run-hooks 'async-smtpmail-before-send-hook)
           (smtpmail-send-it)))