Remove "(tiny fix)" from Julien's entry.
[gnus] / contrib / sendmail.el
1 ;;; sendmail.el --- mail sending commands for Emacs.  -*- byte-compile-dynamic: t -*-
2
3 ;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
4 ;;   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5 ;;   Free Software Foundation, Inc.
6
7 ;; Maintainer: FSF
8 ;; Keywords: mail
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
24
25 ;;; Commentary:
26
27 ;; This mode provides mail-sending facilities from within Emacs.  It is
28 ;; documented in the Emacs user's manual.
29
30 ;;; Code:
31 (eval-when-compile
32   ;; Necessary to avoid recursive `require's.
33   (provide 'sendmail)
34   (require 'rmail)
35   (require 'mailalias))
36
37 (autoload 'rfc2047-encode-string "rfc2047")
38
39 (defgroup sendmail nil
40   "Mail sending commands for Emacs."
41   :prefix "mail-"
42   :group 'mail)
43
44 (defcustom mail-setup-with-from t
45   "Non-nil means insert `From:' field when setting up the message."
46   :type 'boolean
47   :group 'sendmail
48   :version "22.1")
49
50 (defcustom sendmail-program
51   (cond
52     ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
53     ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
54     ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
55     (t "fakemail"))                     ;In ../etc, to interface to /bin/mail.
56   "Program used to send messages."
57   :group 'mail
58   :type 'file)
59
60 ;;;###autoload
61 (defcustom mail-from-style 'angles
62   "Specifies how \"From:\" fields look.
63
64 If `nil', they contain just the return address like:
65         king@grassland.com
66 If `parens', they look like:
67         king@grassland.com (Elvis Parsley)
68 If `angles', they look like:
69         Elvis Parsley <king@grassland.com>
70 If `system-default', allows the mailer to insert its default From field
71 derived from the envelope-from address.
72
73 In old versions of Emacs, the `system-default' setting also caused
74 Emacs to pass the proper email address from `user-mail-address'
75 to the mailer to specify the envelope-from address.  But that is now
76 controlled by a separate variable, `mail-specify-envelope-from'."
77   :type '(choice (const nil) (const parens) (const angles)
78                  (const system-default))
79   :version "20.3"
80   :group 'sendmail)
81
82 ;;;###autoload
83 (defcustom mail-specify-envelope-from nil
84   "If non-nil, specify the envelope-from address when sending mail.
85 The value used to specify it is whatever is found in
86 the variable `mail-envelope-from', with `user-mail-address' as fallback.
87
88 On most systems, specifying the envelope-from address is a
89 privileged operation.  This variable affects sendmail and