Skip to content

Instantly share code, notes, and snippets.

@ype
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save ype/a748c8c2158583f2b138 to your computer and use it in GitHub Desktop.

Select an option

Save ype/a748c8c2158583f2b138 to your computer and use it in GitHub Desktop.
Asynchronous SMTP for Emacs (v.25+)
;; -*- mode: Emacs-Lisp; tab-width: 2; indent-tabs-mode:nil; -*- ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Author: Anton Strilchuk <[email protected]> ;;
;; URL: http://ype.env.sh ;;
;; Created: 22-07-2014 ;;
;; Last-Updated: 22-07-2014 ;;
;; Update #: 5 ;;
;; By: Anton Strilchuk <[email protected]> ;;
;; ;;
;; Filename: lazypostman ;;
;; Description: Send mail later ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;,---------------------------
;;| Send Mail At Specific Time
;;`---------------------------
;; Emacs Async: http://bit.ly/UoPdAo
(add-to-list 'load-path (expand-file-name "~/.emacs.d/from-git/emacs-async"))
;; GnusGmail: http://bit.ly/UoPi7c
(require 'smtpmail-async)
(setq message-send-mail-function 'async-smtpmail-send-it
;; message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587 "[email protected]" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-debug-info nil
smtpmail-local-domain "ilyfa.cc"
sendmail-coding-system 'UTF-8
smtpmail-queue-mail nil
smtpmail-queue-dir "/path/to/mail/queue/")
(smtpmail-send-queued-mail)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment