[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c48d3db 009/187: Added smtpmail-async.el
From: |
Michael Albinus |
Subject: |
[elpa] master c48d3db 009/187: Added smtpmail-async.el |
Date: |
Wed, 30 Dec 2015 11:49:23 +0000 |
branch: master
commit c48d3db6ade148723f37612bb470eedab4b0c9b1
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>
Added smtpmail-async.el
---
smtpmail-async.el | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/smtpmail-async.el b/smtpmail-async.el
new file mode 100644
index 0000000..8d4ea80
--- /dev/null
+++ b/smtpmail-async.el
@@ -0,0 +1,57 @@
+;;; smtpmail-async --- Send e-mail with smtpmail.el asynchronously
+
+;; Copyright (C) 2012 John Wiegley
+
+;; Author: John Wiegley <address@hidden>
+;; Created: 18 Jun 2012
+;; Version: 1.0
+;; Keywords: email async
+;; X-URL: https://github.com/jwiegley/emacs-async
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Send e-mail with smtpmail.el asynchronously. To use:
+;;
+;; (require 'smtpmail-async)
+;;
+;; (setq send-mail-function 'async-smtpmail-send-it
+;; message-send-mail-function 'async-smtpmail-send-it)
+;;
+;; This assumes you already have smtpmail.el working.
+
+(defgroup smtpmail-async nil
+ "Send e-mail with smtpmail.el asynchronously"
+ :group 'smptmail)
+
+(require 'async)
+(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-environment "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-")
+ (smtpmail-send-it)))
+ 'ignore))
+
+(provide 'smtpmail-async)
+
+;;; smtpmail-async.el ends here
- [elpa] master updated (e053cef -> ef4a542), Michael Albinus, 2015/12/30
- [elpa] master 6647749 002/187: Small change, Michael Albinus, 2015/12/30
- [elpa] master 8d37c00 004/187: Added note to README, Michael Albinus, 2015/12/30
- [elpa] master 4733d1e 001/187: Initial revision, Michael Albinus, 2015/12/30
- [elpa] master 3d388c6 007/187: Added support for signal propagation, Michael Albinus, 2015/12/30
- [elpa] master 0a7f3dd 008/187: Added async-inject-environment, Michael Albinus, 2015/12/30
- [elpa] master 954c865 006/187: Updated README, Michael Albinus, 2015/12/30
- [elpa] master a8ac820 003/187: Renamed emacs-async.el to async.el, Michael Albinus, 2015/12/30
- [elpa] master 63fe7ee 010/187: Updated README, Michael Albinus, 2015/12/30
- [elpa] master c48d3db 009/187: Added smtpmail-async.el,
Michael Albinus <=
- [elpa] master 728e791 005/187: Added dired-async, Michael Albinus, 2015/12/30
- [elpa] master 628a295 014/187: Send data over a pipe, rather than in an argument, Michael Albinus, 2015/12/30
- [elpa] master 190a040 012/187: Fixed async-smtpmail-send-it, Michael Albinus, 2015/12/30
- [elpa] master 4fb51ce 013/187: Corrected a problem with async deletions, Michael Albinus, 2015/12/30
- [elpa] master 1ad2902 011/187: Quiet byte-compiler warnings, Michael Albinus, 2015/12/30
- [elpa] master 742c82e 020/187: Added message passing, but undocumented for now, Michael Albinus, 2015/12/30
- [elpa] master b80f1a5 018/187: Don't use pipes for communication just yet, Michael Albinus, 2015/12/30
- [elpa] master 497e4da 024/187: Fix to dired-async for wdired-mode, Michael Albinus, 2015/12/30
- [elpa] master e08c251 017/187: Added `dired-async-use-native-commands', Michael Albinus, 2015/12/30
- [elpa] master 7ba4f40 022/187: Always base64 encode, Michael Albinus, 2015/12/30