Gnus development mailing list
 help / color / mirror / Atom feed
* Removing Self Address from the CC
@ 2014-09-14  4:38 Hideki Saito
  2014-09-14 10:17 ` Adam Sjøgren
  0 siblings, 1 reply; 3+ messages in thread
From: Hideki Saito @ 2014-09-14  4:38 UTC (permalink / raw)
  To: ding

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing Self Address from the CC
  2014-09-14  4:38 Removing Self Address from the CC Hideki Saito
@ 2014-09-14 10:17 ` Adam Sjøgren
  2014-09-14 18:52   ` Hideki Saito
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Sjøgren @ 2014-09-14 10:17 UTC (permalink / raw)
  To: ding

Hideki Saito <hidekis@gmail.com> writes:

> I'm trying to find the good way of removing self-CC address from the
> header.

Does it help to set the variable message-dont-reply-to-names to match
your email-adresses?

,----[ C-h v message-dont-reply-to-names RET ]
| message-dont-reply-to-names is a variable defined in `message.el'.
| Its value is
| "\\(asjo\\|adam\\)@\\(koldfront.dk\\|asjo.org\\)"
| Original value was nil
| 
| Documentation:
| *Addresses to prune when doing wide replies.
| This can be a regexp or a list of regexps.  Also, a value of nil means
| exclude your own user name only.
`----


  Best regards,

    Adam

-- 
 "This means that tweets about Lady Gaga's lingerie           Adam Sjøgren
  can help someone debugging Perl code. (Or a tweet      asjo@koldfront.dk
  about Perl code may help Lady Gaga's underwear
  stylist.)"




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing Self Address from the CC
  2014-09-14 10:17 ` Adam Sjøgren
@ 2014-09-14 18:52   ` Hideki Saito
  0 siblings, 0 replies; 3+ messages in thread
From: Hideki Saito @ 2014-09-14 18:52 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

>
> Does it help to set the variable message-dont-reply-to-names to match
> your email-adresses?
>
> ,----[ C-h v message-dont-reply-to-names RET ]
> | message-dont-reply-to-names is a variable defined in `message.el'.
> | Its value is
> | "\\(asjo\\|adam\\)@\\(koldfront.dk\\|asjo.org\\)"
> | Original value was nil
> | 
> | Documentation:
> | *Addresses to prune when doing wide replies.
> | This can be a regexp or a list of regexps.  Also, a value of nil means
> | exclude your own user name only.
> `----
>

Thank you for the suggestion

Yes, this is the way I have set up for the meantime.

Only limitation I can think of is when replying to E-mail address to
a.com (and CCed to b.com) from a.com, where CC to b.com would be removed... 


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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-14 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14  4:38 Removing Self Address from the CC Hideki Saito
2014-09-14 10:17 ` Adam Sjøgren
2014-09-14 18:52   ` Hideki Saito

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).