Gnus development mailing list
 help / color / mirror / Atom feed
From: Hideki Saito <hidekis@gmail.com>
To: ding@gnus.org
Subject: Removing Self Address from the CC
Date: Sat, 13 Sep 2014 21:38:51 -0700	[thread overview]
Message-ID: <87d2ayyfxg.fsf@madoka.hidekisaito.com> (raw)

Hi,

If I can get some recommendation for this, it'll be very
helpful. Basically, I'm trying to find the good way of removing self-CC
address from the header. Because my SMTP/address switching is fairly
complicated with different address and aliases I have to reply from, I'm using the script like following:


(defun gnus-hideki-a ()
  (interactive)
  (message-goto-from)
  (kill-whole-line)
  (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587 me@a.com\nFrom: Myself <me@a.com>\n")
  (message-goto-signature)
  (kill-whole-line)
  (insert "Stuff to add for a.com")
  (message-goto-body)
  )

(defun gnus-hideki-a ()
  (interactive)
  (message-goto-from)
  (kill-whole-line)
  (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587
  me@b.com\nFrom: Myself
  <me@b.com>\nOrganization: B\n")
  (message-goto-signature)
  (kill-whole-line)
  (insert "Stuff to add for b.com")
  (message-goto-body)
  )

However, the complication is when I wide reply an E-mail message, it'd
often end up in E-mail header, such as:

From: someone@a.com
To: me@a.com
CC: Myself <me@b.com>

or

From: someone@a.com
To: me@a.com
CC: me@b.com

Essentially, what I'm trying to get accomomplished is to remove myself
from CC only when it matches with my From address. The complicated part
is that gnus won't know my "Myself" address until the moment of sending
the message (thus, built-in option to eradicate address with regexp
won't work in my case), so I'm thinking about incorporating the code to
verify and remove the address when the above switching takes place.

If you have any suggestion, that would be very helpful.

Thank you.

-- 
Hideki Saito
OpenPGP Key: http://hidekisaito.com/aff2e40b.txt
1066 3928 7B0B E7CD A0CB  3686 1FDF D937 AFF2 E40B
http://hidekisaito.com



             reply	other threads:[~2014-09-14  4:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14  4:38 Hideki Saito [this message]
2014-09-14 10:17 ` Adam Sjøgren
2014-09-14 18:52   ` Hideki Saito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2ayyfxg.fsf@madoka.hidekisaito.com \
    --to=hidekis@gmail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).