summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-05-18 11:24:16 +0000
committerGerd Moellmann <gerd@gnu.org>2001-05-18 11:24:16 +0000
commit2b5c7e03a564ce4ca5939f20047da1aefaddd7d6 (patch)
treee5ebdb88190134f4476e87e6de79bc91fc8bb3f9
parent9db6f6b460c9c73f3563df3dc07462ee7dc4d8b1 (diff)
downloademacs-2b5c7e03a564ce4ca5939f20047da1aefaddd7d6.tar.gz
(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 @@
;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail
-;;; ### Hacked by Mike Taylor, 11th October 1999 to add support for
-;;; automatically appending a domain to RCPT TO: addresses.
;; Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
;; Maintainer: Brian D. Carlstrom <bdc@ai.mit.edu>
;; ESMTP support: Simon Leinen <simon@switch.ch>
+;; Hacked by Mike Taylor, 11th October 1999 to add support for
+;; automatically appending a domain to RCPT TO: addresses.
;; Keywords: mail
;; This file is part of GNU Emacs.
@@ -93,12 +93,6 @@ buffer includes an exchange like:
:type '(choice (const nil) string)
:group 'smtpmail)
-(defun maybe-append-domain (recipient)
- (if (or (not smtpmail-sendto-domain)
- (string-match "@" recipient))
- recipient
- (concat recipient "@" smtpmail-sendto-domain)))
-
(defcustom smtpmail-debug-info nil
"*smtpmail debug info printout. messages and process buffer."
:type 'boolean
@@ -338,6 +332,12 @@ This is relative to `smtpmail-queue-dir'.")
(concat (system-name) "." smtpmail-local-domain)
(system-name)))
+(defun smtpmail-maybe-append-domain (recipient)
+ (if (or (not smtpmail-sendto-domain)
+ (string-match "@" recipient))
+ recipient
+ (concat recipient "@" smtpmail-sendto-domain)))
+
(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(let ((process nil)
(host (or smtpmail-smtp-server
@@ -481,7 +481,7 @@ This is relative to `smtpmail-queue-dir'.")
;; RCPT TO: <recipient>
(let ((n 0))
(while (not (null (nth n recipient)))
- (smtpmail-send-command process (format "RCPT TO: <%s>" (maybe-append-domain (nth n recipient))))
+ (smtpmail-send-command process (format "RCPT TO: <%s>" (smtpmail-maybe-append-domain (nth n recipient))))
(setq n (1+ n))
(setq response-code (smtpmail-read-response process))