mail.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 03 Oct 2015 18:29:10 +0300
changeset 1765 2132765de2f4
parent 1346 a2fbf50a43f4
child 1905 fba288d59662
permissions -rw-r--r--
Cellular automaton.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1283
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1294
diff changeset
     2
.. include:: HEADER.rst
1283
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
=======
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 Mail.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
=======
1346
a2fbf50a43f4 Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
     7
.. contents::
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
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
  http://tools.ietf.org/rfc//rfc2076.txt
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
                Common Internet Message Headers, Informational
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
  http://tools.ietf.org/rfc/rfc2822.txt
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
                Internet Message Format, Standard Track
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
  http://tools.ietf.org/rfc/rfc2821.txt
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
                Simple Mail Transfer Protocol, Standard Track
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
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    69
 * http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    70
 * http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    71
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    72
Mail etiquette.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    73
===============
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
Bottom vs. top quoting.
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
Just not use 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
Stallman warn about Google.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    81
---------------------------
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
  http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg00302.html
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
Storage format for email.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    86
=========================
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
mbox.
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
  http://tools.ietf.org/html/rfc4155
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    92
                The application/mbox Media Type (Category: Informational)
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    93
  http://en.wikipedia.org/wiki/Mbox
1294
571618059000 Fix RST syntax.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1283
diff changeset
    94
                Mbox at Wikipedia.
1283
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    95
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    96
maildir.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    97
--------
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
  http://en.wikipedia.org/wiki/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
MH mailbox format.
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   102
------------------
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
  http://en.wikipedia.org/wiki/MH_Message_Handling_System
246ef49034d4 Sending mail with ssmtp.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   105