On Wed, 29 Sep 2004, [EMAIL PROTECTED] wrote:
> * Ted Zlatanov:
>> I use the diary mode to remember when I send e-mail and to who
>> (it's automatic with a little bit of code), so I can always look at
>> a day and tell what e-mails I sent that day.
>
> This sounds like a really nice feature. Could you post the code?
This is for Gnus. You may be able to get it to work with other MUAs.
The code came from someone else on the Gnus newsgroups, so I don't
take credit for it. Just add it to your gnus.el file. See gnus.org
for more information on Gnus.
(require 'diary-lib)
(defun message-to-diary ()
(make-diary-entry (concat
(format-time-string "%B %d, %Y %H:%M" (gnus-date-get-time
(message-fetch-field "date")))
(if (message-fetch-field "newsgroups")
(concat " Sent news To: " (message-fetch-field "newsgroups"))
(concat " Sent mail To: " (message-fetch-field "to")))
" Subject: \"" (message-fetch-field "subject") "\""
" Message-ID: " (message-fetch-field "message-id")))
(save-buffer "diary"))
(add-hook 'message-sent-hook 'message-to-diary)
Ted