changeset 52321:e4b050573b12

(smtpmail-mail-address): Doc change. (smtpmail-send-it): Make treatment of envelope-from consistent with sendmail.el.
author Glenn Morris <rgm@gnu.org>
date Sun, 24 Aug 2003 15:23:12 +0000
parents af0e45b62c3e
children e9922af67382
files lisp/mail/smtpmail.el
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el	Sun Aug 24 15:22:13 2003 +0000
+++ b/lisp/mail/smtpmail.el	Sun Aug 24 15:23:12 2003 +0000
@@ -212,7 +212,7 @@
 ;;;
 
 (defvar smtpmail-mail-address nil
-  "Value of `user-mail-address' in ambient buffer.")
+  "Value to use for envelope-from address for mail from ambient buffer.")
 
 ;;;###autoload
 (defun smtpmail-send-it ()
@@ -223,7 +223,9 @@
 	(case-fold-search nil)
 	delimline
 	(mailbuf (current-buffer))
-	(smtpmail-mail-address user-mail-address)
+	(smtpmail-mail-address
+         (or (and mail-specify-envelope-from (mail-envelope-from))
+             user-mail-address))
 	(smtpmail-code-conv-from
 	 (if enable-multibyte-characters
 	     (let ((sendmail-coding-system smtpmail-code-conv-from))
@@ -545,9 +547,6 @@
 	(host (or smtpmail-smtp-server
 		  (error "`smtpmail-smtp-server' not defined")))
 	(port smtpmail-smtp-service)
-	(envelope-from (or (mail-envelope-from)
-			   smtpmail-mail-address
-			   user-mail-address))
 	response-code
 	greeting
 	process-buffer
@@ -697,7 +696,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"
-						     envelope-from
+                                                     smtpmail-mail-address
 						     size-part
 						     body-part))