aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2001-01-26 18:24:03 +0000
committerDave Love2001-01-26 18:24:03 +0000
commit67ad9438c96087307eef638be8b9ec1baad08dba (patch)
treedbe32ac400ad250cb99fc5139a3810f8ff239987
parentdda5808aae59181ff2e2019e71489819851614e4 (diff)
downloademacs-67ad9438c96087307eef638be8b9ec1baad08dba.tar.gz
emacs-67ad9438c96087307eef638be8b9ec1baad08dba.zip
Doc fixes.
(sendmail-send-it): Fix the non-ASCII regexp and use rfc2047-encode-string.
-rw-r--r--lisp/mail/sendmail.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 9042b69dc1c..16d06cba4e5 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1,6 +1,6 @@
1;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*- 1;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*-
2 2
3;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000 3;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -35,6 +35,8 @@
35 (require 'rmail) 35 (require 'rmail)
36 (require 'mailalias)) 36 (require 'mailalias))
37 37
38(autoload 'rfc2047-encode-string "rfc2047")
39
38(defgroup sendmail nil 40(defgroup sendmail nil
39 "Mail sending commands for Emacs." 41 "Mail sending commands for Emacs."
40 :prefix "mail-" 42 :prefix "mail-"
@@ -96,10 +98,12 @@ nil means let mailer mail back a message to report errors."
96 98
97;; Useful to set in site-init.el 99;; Useful to set in site-init.el
98;;;###autoload 100;;;###autoload
99(defcustom send-mail-function 'sendmail-send-it "\ 101(defcustom send-mail-function 'sendmail-send-it
100Function to call to send the current buffer as mail. 102 "Function to call to send the current buffer as mail.
101The headers should be delimited by a line which is 103The headers should be delimited by a line which is
102not a valid RFC822 header or continuation line." 104not a valid RFC822 header or continuation line.
105This is used by the default mail-sending commands. See also
106`message-send-mail-function' for use with the Message package."
103 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") 107 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package")
104 (function-item smtpmail-send-it :tag "Use SMTPmail package") 108 (function-item smtpmail-send-it :tag "Use SMTPmail package")
105 (function-item feedmail-send-it :tag "Use Feedmail package") 109 (function-item feedmail-send-it :tag "Use Feedmail package")
@@ -779,6 +783,9 @@ of outgoing mails regardless of the current language environment.
779See also the function `select-message-coding-system'.") 783See also the function `select-message-coding-system'.")
780 784
781(defun sendmail-send-it () 785(defun sendmail-send-it ()
786 "Send the current mail buffer using the Sendmail package.
787This is a suitable value for `send-mail-function'. It sends using the
788external program defined by `sendmail-program'."
782 (require 'mail-utils) 789 (require 'mail-utils)
783 (let ((errbuf (if mail-interactive 790 (let ((errbuf (if mail-interactive
784 (generate-new-buffer " sendmail errors") 791 (generate-new-buffer " sendmail errors")
@@ -863,8 +870,8 @@ See also the function `select-message-coding-system'.")
863 (let* ((login user-mail-address) 870 (let* ((login user-mail-address)
864 (fullname (user-full-name)) 871 (fullname (user-full-name))
865 (quote-fullname nil)) 872 (quote-fullname nil))
866 (if (string-match "[\200-\377]" fullname) 873 (if (string-match "[^\0-\177]" fullname)
867 (setq fullname (mail-quote-printable fullname t) 874 (setq fullname (rfc2047-encode-string fullname)
868 quote-fullname t)) 875 quote-fullname t))
869 (cond ((eq mail-from-style 'angles) 876 (cond ((eq mail-from-style 'angles)
870 (insert "From: " fullname) 877 (insert "From: " fullname)