author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 10 Feb 2018 01:36:16 +0200 | |
changeset 2229 | 1a0b6597e594 |
parent 2228 | 837f1337c59b |
permissions | -rw-r--r-- |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
.. -*- coding: utf-8; -*- |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
======= |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
Mail. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
======= |
1346
a2fbf50a43f4
Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
6 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
7 |
:local: |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
Message headers fields. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
======================= |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
:: |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
from = "From:" mailbox-list CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
sender = "Sender:" mailbox CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
reply-to = "Reply-To:" address-list CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
to = "To:" address-list CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
cc = "Cc:" address-list CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
19 |
bcc = "Bcc:" (address-list / [CFWS]) CRLF |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
newsgroups |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
22 |
http://tools.ietf.org/rfc//rfc2076.txt |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
23 |
Common Internet Message Headers, Informational |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
24 |
http://tools.ietf.org/rfc/rfc2822.txt |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
25 |
Internet Message Format, Standard Track |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
26 |
http://tools.ietf.org/rfc/rfc2821.txt |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
27 |
Simple Mail Transfer Protocol, Standard Track |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
Sending mail with ssmtp. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
======================== |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
31 |
:: |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
32 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
33 |
$ cat /etc/ssmtp/ssmtp.conf |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
Mailhub=smtp.gmail.com:587 |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
35 |
FromLineOverride=YES |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
36 |
UseSTARTTLS=yes |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
37 |
AuthUser=gavenkoa |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
38 |
AuthPass=XXXXXX |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
39 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
40 |
Sending email via gmail in emacs. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
41 |
================================= |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
42 |
:: |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
43 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
44 |
; install starttls from here (no need for patch) |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
45 |
; http://josefsson.org/emacs-smtp-starttls.html |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
46 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
47 |
(setq send-mail-function 'smtpmail-send-it |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
48 |
message-send-mail-function 'smtpmail-send-it |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
49 |
smtpmail-starttls-credentials |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
50 |
'(("smtp.gmail.com" 587 nil nil)) |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
51 |
smtpmail-auth-credentials |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
52 |
(expand-file-name "~/.authinfo") |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
53 |
smtpmail-default-smtp-server "smtp.gmail.com" |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
54 |
smtpmail-smtp-server "smtp.gmail.com" |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
55 |
smtpmail-smtp-service 587 |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
56 |
smtpmail-debug-info t |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
57 |
starttls-extra-arguments nil |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
58 |
smtpmail-warn-about-unknown-extensions t |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
59 |
starttls-use-gnutls nil) |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
60 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
61 |
Update ``~/..authinfo``:: |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
62 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
63 |
machine smtp.gmail.com login [your name]@gmail.com password [your password] |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
64 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
65 |
And finally download, unzip, make and install startttls:: |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
66 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
67 |
http://josefsson.org/emacs-smtp-starttls.html |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
68 |
|
2033
038fa1d1ff24
Configuring Your MX Records: Other domain hosts.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
69 |
https://support.google.com/a/answer/33915 |
038fa1d1ff24
Configuring Your MX Records: Other domain hosts.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
70 |
Configuring Your MX Records: Other domain hosts. |
038fa1d1ff24
Configuring Your MX Records: Other domain hosts.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
71 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
72 |
* http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
73 |
* http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
74 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
75 |
Mail etiquette. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
76 |
=============== |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
77 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
78 |
Bottom vs. top quoting. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
79 |
----------------------- |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
80 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
81 |
Just not use top quoting! |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
82 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
83 |
Stallman warn about Google. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
84 |
--------------------------- |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
85 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
86 |
* http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00302.html |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
87 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
88 |
Storage format for email. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
89 |
========================= |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
90 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
91 |
mbox. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
92 |
----- |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
93 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
94 |
http://tools.ietf.org/html/rfc4155 |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
95 |
The application/mbox Media Type (Category: Informational) |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
96 |
http://en.wikipedia.org/wiki/Mbox |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
97 |
Mbox at Wikipedia. |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
98 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
99 |
maildir. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
100 |
-------- |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
101 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
102 |
* http://en.wikipedia.org/wiki/Maildir |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
103 |
|
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
104 |
MH mailbox format. |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
105 |
------------------ |
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
106 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2033
diff
changeset
|
107 |
* http://en.wikipedia.org/wiki/MH_Message_Handling_System |
1283
246ef49034d4
Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
108 |