Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Michael R. Wolf <MichaelRunningWolf@att.net>
Subject: Re: would like inverse of bbdb/mail-auto-create-p
Date: Mon, 26 May 2003 14:03:56 -0700	[thread overview]
Message-ID: <uu1bhifnn.fsf@att.net> (raw)
In-Reply-To: <ud6i54efq.fsf@att.net>

Michael R. Wolf <MichaelRunningWolf@att.net> writes:


[...]

> Here's the working code....

[...]

With just one more tweak.



;;; It works.
;;; TODO -- remove the mapconcat addition of commas, that get removed by m-t-h
(defun wolf3-bbdb-add-recipients-to-bbdb ()
  "Add all recipients to BBDB, using this list of headers:
	from, sender, 
        to, cc, bcc,
        resent-from, resent-to, resent-cc, resent-bcc."
  (let ((fields '("from" "sender" 
		  "to" "cc" "bcc" 
		  "resent-from" "resent-to" "resent-cc" "resent-bcc")))
    (mapc 
     (lambda (address)
       (bbdb-annotate-message-sender address t t t))
     (save-restriction
       (message-narrow-to-headers)
       (message-tokenize-header (mapconcat 'message-fetch-field fields ","))))))

;;; Could go into many hooks:
;;;        message-send-mail-hook
;;;        message-send-news-hook
;;;        message-send-hook
;;;        message-sent-hook
(add-hook 'message-send-hook 'wolf3-bbdb-add-recipients-to-bbdb)

-- 
Michael R. Wolf
    All mammals learn by playing!
        MichaelRunningWolf@att.net


           reply	other threads:[~2003-05-26 21:03 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <ud6i54efq.fsf@att.net>]

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=uu1bhifnn.fsf@att.net \
    --to=michaelrunningwolf@att.net \
    /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).