From a915dc6d70636947f168d634495a1a84f28fdc6b Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 20 Feb 1996 19:21:45 +0000 Subject: [PATCH] (gnus-inews-insert-headers): Check whether Sender and From are equal before inserting a Sender header. --- lisp/gnus-msg.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 2e182e6a97d..6756b9e1c52 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1136,17 +1136,19 @@ Headers in `gnus-required-headers' will be generated." ;; Insert new Sender if the From is strange. (let ((from (mail-fetch-field "from")) (sender (mail-fetch-field "sender"))) - (if (and from + (if (and from (not (string= - (downcase (car (gnus-extract-address-components from))) + (downcase + (car (cdr (gnus-extract-address-components from)))) (downcase (gnus-inews-real-user-address)))) (or (null sender) - (not + (not (string= - (downcase (car (gnus-extract-address-components sender))) + (downcase + (car (cdr (gnus-extract-address-components sender)))) (downcase (gnus-inews-real-user-address)))))) (progn - (goto-char (point-min)) + (goto-char (point-min)) (and (re-search-forward "^Sender:" nil t) (progn (beginning-of-line) -- 2.39.2