Commit 8ce192e3 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

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.
parent 6ec9a5a7
......@@ -1403,6 +1403,10 @@ If you had that set, you need to put
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',
......
2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
* 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 <dgutov@yandex.ru>
 
* progmodes/ruby-mode.el: Clean up keybindings.
......
......@@ -200,10 +200,10 @@ The list is in preference order.")
;; 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 @@ Returns an error if the server cannot be contacted."
(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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment