]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
an example for sending email via gmail
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 5 Dec 2016 15:39:06 +0000 (16:39 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 5 Dec 2016 15:39:06 +0000 (16:39 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 506a51dcca00a7e07b1f58d88b38ce48a510854e..458c936281c33178390fb5605ddbfc34b7788805 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -1770,6 +1770,28 @@ To send e-mail messages by SMTP, the following is necessary.
 
 #+END_SRC
 
+Here is an example for sending e-mail via gmail:
+
+#+BEGIN_SRC emacs-lisp :tangle no
+  (setq
+  send-mail-function 'smtpmail-send-it
+  message-send-mail-function 'smtpmail-send-it
+  user-mail-address "fooNOSPAMgmail.com"
+  smtpmail-starttls-credentials '(("smtp.gmail.com" "587" nil nil))
+  smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg")
+  smtpmail-default-smtp-server "smtp.gmail.com"
+  smtpmail-smtp-server "smtp.gmail.com"
+  smtpmail-smtp-service 587
+  smtpmail-debug-info t
+  starttls-extra-arguments nil
+  starttls-gnutls-program "/opt/local/bin/gnutls-cli"
+  starttls-extra-arguments nil
+  starttls-use-gnutls t
+  )
+  (load-library "smtpmail")
+
+#+END_SRC
+
 If you want to use POP to receive e-mail messages, the followings are
 necessary.