[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Checking if user-mail-address is in To or CC (to avoid an embarrassing s
From: |
Uwe Brauer |
Subject: |
Checking if user-mail-address is in To or CC (to avoid an embarrassing social situation) BCC |
Date: |
Mon, 10 Feb 2025 18:49:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi
Let’s assume I write an email to:
- Arthur,
- add John and Richard in CC, and
- also include Robert in BCC.
This is done to ensure that Arthur does not know Robert received a
copy of the email.
Now, if John replies and uses the "Reply to all" function, everything
is fine. However, if Robert does the same because he wants to reply to
John and Richard, Arthur will also receive a copy—revealing that
Robert was originally BCC'd.
Robert can only avoid this by using a function (before replying to
all) that checks whether the sender was included in the original
email’s *To* or *CC* fields.
Here is a function that performs this check, but it only works in the *article
buffer*.
--8<---------------cut here---------------start------------->8---
(defun check-my-to-field ()
"This function will be run before you execute followup. And it warns you if
your email address is not
in the To field. That warning is a safty message if you had been only on the
BCC field!!"
(interactive)
(unless (string-match user-mail-address (message-fetch-field "To"))
(if (y-or-n-p "Warning: Followup? But you are not on the TO field, you
FOOL, proceed?")
(message "I hope you are sure.")
(error
(progn
(message "Aborted, you are not in the To: field!!!"))))))
(defadvice gnus-article-followup-with-original (before mychecktofield activate)
"This function will be run before you execute followup. It warns you if
your email address is not in the To field. That warning is a safty
message if you had been only on the BCC field!!"
(check-my-to-field))
--8<---------------cut here---------------end--------------->8---
It does not work in the *summary buffer*.
Does anyone know how to modify my function so that it also works in the
*summary buffer*?
Uwe Brauer
- Checking if user-mail-address is in To or CC (to avoid an embarrassing social situation) BCC,
Uwe Brauer <=
- [Solution of sorts] (was: Checking if user-mail-address is in To or CC (to avoid an embarrassing social situation) BCC), Uwe Brauer, 2025/02/10
- Re: [Solution of sorts], Michael Heerdegen, 2025/02/10
- Re: [Solution of sorts], Uwe Brauer, 2025/02/11
- [defadvice, advice-add ] (was: [Solution of sorts]), Uwe Brauer, 2025/02/11
- Re: [defadvice, advice-add ], Michael Heerdegen, 2025/02/11
- [which hook?] (was: [defadvice, advice-add ]), Uwe Brauer, 2025/02/12
- Re: [defadvice, advice-add ], Uwe Brauer, 2025/02/12
- Re: [defadvice, advice-add ], Christoph Groth, 2025/02/12
- Re: [defadvice, advice-add ], Uwe Brauer, 2025/02/13
- Re: [defadvice, advice-add ], Uwe Brauer, 2025/02/15