emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109875: Have smtpmail.el prefer the


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109875: Have smtpmail.el prefer the From: header for the MAIL FROM envelope
Date: Tue, 04 Sep 2012 18:00:10 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109875
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2012-09-04 18:00:10 +0200
message:
  Have smtpmail.el prefer the From: header for the MAIL FROM envelope
  
  * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header
  over `user-mail-address' for the SMTP MAIL FROM envelope.
  (smtpmail-via-smtp): Ditto.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/mail/smtpmail.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-09-03 08:54:25 +0000
+++ b/etc/NEWS  2012-09-04 16:00:10 +0000
@@ -1403,6 +1403,10 @@
 
 in your ~/.authinfo file instead.
 
+*** SMTPmail defaults to using the address in the From: header as the
+SMTP MAIL FROM envelope.  To override this, set `mail-envelope-from'
+to the address you wish to use instead.
+
 ** SQL mode
 
 *** New options `sql-port', `sql-connection-alist', `sql-send-terminator',

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-09-04 04:44:43 +0000
+++ b/lisp/ChangeLog    2012-09-04 16:00:10 +0000
@@ -1,3 +1,9 @@
+2012-09-04  Lars Ingebrigtsen  <address@hidden>
+
+       * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header
+       over `user-mail-address' for the SMTP MAIL FROM envelope.
+       (smtpmail-via-smtp): Ditto.
+
 2012-09-04  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el: Clean up keybindings.

=== modified file 'lisp/mail/smtpmail.el'
--- a/lisp/mail/smtpmail.el     2012-05-09 19:12:20 +0000
+++ b/lisp/mail/smtpmail.el     2012-09-04 16:00:10 +0000
@@ -200,10 +200,10 @@
        ;; local binding in the mail buffer will take effect.
        (smtpmail-mail-address
          (or (and mail-specify-envelope-from (mail-envelope-from))
-             (smtpmail-user-mail-address)
-            (let ((from (mail-fetch-field "from")))
+             (let ((from (mail-fetch-field "from")))
               (and from
-                   (cadr (mail-extract-address-components from))))))
+                   (cadr (mail-extract-address-components from))))
+            (smtpmail-user-mail-address)))
        (smtpmail-code-conv-from
         (if enable-multibyte-characters
             (let ((sendmail-coding-system smtpmail-code-conv-from))
@@ -653,12 +653,10 @@
         (or smtpmail-mail-address
             (and mail-specify-envelope-from
                  (mail-envelope-from))
-            (smtpmail-user-mail-address)
-            ;; Fall back on the From: header as the envelope From
-            ;; address.
             (let ((from (mail-fetch-field "from")))
               (and from
-                   (cadr (mail-extract-address-components from))))))
+                   (cadr (mail-extract-address-components from))))
+            (smtpmail-user-mail-address)))
        response-code
        process-buffer
        result


reply via email to

[Prev in Thread] Current Thread [Next in Thread]