aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-05-18 11:24:16 +0000
committerGerd Moellmann2001-05-18 11:24:16 +0000
commit2b5c7e03a564ce4ca5939f20047da1aefaddd7d6 (patch)
treee5ebdb88190134f4476e87e6de79bc91fc8bb3f9
parent9db6f6b460c9c73f3563df3dc07462ee7dc4d8b1 (diff)
downloademacs-2b5c7e03a564ce4ca5939f20047da1aefaddd7d6.tar.gz
emacs-2b5c7e03a564ce4ca5939f20047da1aefaddd7d6.zip
(maybe-append-domain): Renamed to
`smtpmail-maybe-append-domain'. (smtpmail-via-smtp): Use the new name.
-rw-r--r--lisp/mail/smtpmail.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index abe0a365472..fdc33ac2a11 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -1,12 +1,12 @@
1;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail 1;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail
2;;; ### Hacked by Mike Taylor, 11th October 1999 to add support for
3;;; automatically appending a domain to RCPT TO: addresses.
4 2
5;; Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
6 4
7;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> 5;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
8;; Maintainer: Brian D. Carlstrom <bdc@ai.mit.edu> 6;; Maintainer: Brian D. Carlstrom <bdc@ai.mit.edu>
9;; ESMTP support: Simon Leinen <simon@switch.ch> 7;; ESMTP support: Simon Leinen <simon@switch.ch>
8;; Hacked by Mike Taylor, 11th October 1999 to add support for
9;; automatically appending a domain to RCPT TO: addresses.
10;; Keywords: mail 10;; Keywords: mail
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -93,12 +93,6 @@ buffer includes an exchange like:
93 :type '(choice (const nil) string) 93 :type '(choice (const nil) string)
94 :group 'smtpmail) 94 :group 'smtpmail)
95 95
96(defun maybe-append-domain (recipient)
97 (if (or (not smtpmail-sendto-domain)
98 (string-match "@" recipient))
99 recipient
100 (concat recipient "@" smtpmail-sendto-domain)))
101
102(defcustom smtpmail-debug-info nil 96(defcustom smtpmail-debug-info nil
103 "*smtpmail debug info printout. messages and process buffer." 97 "*smtpmail debug info printout. messages and process buffer."
104 :type 'boolean 98 :type 'boolean
@@ -338,6 +332,12 @@ This is relative to `smtpmail-queue-dir'.")
338 (concat (system-name) "." smtpmail-local-domain) 332 (concat (system-name) "." smtpmail-local-domain)
339 (system-name))) 333 (system-name)))
340 334
335(defun smtpmail-maybe-append-domain (recipient)
336 (if (or (not smtpmail-sendto-domain)
337 (string-match "@" recipient))
338 recipient
339 (concat recipient "@" smtpmail-sendto-domain)))
340
341(defun smtpmail-via-smtp (recipient smtpmail-text-buffer) 341(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
342 (let ((process nil) 342 (let ((process nil)
343 (host (or smtpmail-smtp-server 343 (host (or smtpmail-smtp-server
@@ -481,7 +481,7 @@ This is relative to `smtpmail-queue-dir'.")
481 ;; RCPT TO: <recipient> 481 ;; RCPT TO: <recipient>
482 (let ((n 0)) 482 (let ((n 0))
483 (while (not (null (nth n recipient))) 483 (while (not (null (nth n recipient)))
484 (smtpmail-send-command process (format "RCPT TO: <%s>" (maybe-append-domain (nth n recipient)))) 484 (smtpmail-send-command process (format "RCPT TO: <%s>" (smtpmail-maybe-append-domain (nth n recipient))))
485 (setq n (1+ n)) 485 (setq n (1+ n))
486 486
487 (setq response-code (smtpmail-read-response process)) 487 (setq response-code (smtpmail-read-response process))