changeset 45252:ee1b06064fbb

(smtpmail-mail-address): New variable. (smtpmail-send-it): Bind and use that instead of `mail-address'. (smtpmail-via-smtp): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sun, 12 May 2002 17:00:52 +0000
parents b7c70c3b9faf
children b1dab10e4ef2
files lisp/mail/smtpmail.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el	Sun May 12 16:52:46 2002 +0000
+++ b/lisp/mail/smtpmail.el	Sun May 12 17:00:52 2002 +0000
@@ -211,6 +211,9 @@
 ;;;
 ;;;
 
+(defvar smtpmail-mail-address nil
+  "Value of `user-mail-address' in ambient buffer.")
+
 ;;;###autoload
 (defun smtpmail-send-it ()
   (let ((errbuf (if mail-interactive
@@ -220,7 +223,7 @@
 	(case-fold-search nil)
 	delimline
 	(mailbuf (current-buffer))
-	(mail-address user-mail-address)
+	(smtpmail-mail-address user-mail-address)
 	(smtpmail-code-conv-from
 	 (if enable-multibyte-characters
 	     (let ((sendmail-coding-system smtpmail-code-conv-from))
@@ -261,7 +264,7 @@
 	    ;; they put one in themselves.
 	    (goto-char (point-min))
 	    (if (not (re-search-forward "^From:" delimline t))
-		(let* ((login mail-address)
+		(let* ((login smtpmail-mail-address)
 		       (fullname (user-full-name)))
 		  (cond ((eq mail-from-style 'angles)
 			 (insert "From: " fullname)
@@ -686,7 +689,7 @@
 ;	      (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn)))
 	      (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s"
 						     (or mail-envelope-from
-							 mail-address)
+							 smtpmail-mail-address)
 						     size-part
 						     body-part))