On Fri, Jul 02, 2010 at 07:13:02PM +0200, lee wrote:
> On Fri, Jul 02, 2010 at 05:15:36PM +0100, Toby Cubitt wrote:
> 
> > the Disposition-Notification-To: header. So to request receipts, it may
> > be sufficient to add this header to your outgoing emails using mutt's
> > my_hdr command.
> 
> That puts the header into every outgoing email, and ppl on mailing
> lists will complain about it.

I know perfectly well what my_hdr does. You ought to know perfectly well
that mutt has plenty of facilities (send-hook, send2-hook, reply-hook...)
for selectively setting my_hdr based on the recipient. $edit-headers plus
a decent text editor provide even more possibilities.

> > So, with a little effort, what you want can probably already be done
> > using standard mutt features (plus maybe some external tools for
> > automatically sending receipts).
> 
> Ok, how so? Refer to to my OP for a more detailed description of how
> it's supposed to work ...

I was thinking more of the traditional read receipt behaviour when I
wrote that, but I'll bite.

Referring to your OP:

> how do I make it so that reciepts are requested based on, for example,
> recipients?

Use send-hooks (or send2-hook, or reply-hook -- I always forget the
details of which does what, and have to look it up in the manual) to set
my_hdr based on the recipient.

> The idea is something like mutt asking me if I want to request a
> reciept when sending a message to a combination of recipients not yet
> recognized by mutt. It then would remember my decision and add that
> particular combination of recipients to some list for later reference
> as to what decision I have made. Next time when sending messages to
> that same combination of recipients, mutt would automatically either
> request a reciept or not, depending on my decision once made ---
> unless I explicitly instruct mutt otherwise when sending a message.

This is obviously trickier.

You could try setting $editor to a script that prompts you about send
receipts, and writes a new send-hook based on your choice to a mutt
config file. You'd then need to make mutt re-source the modified config
file, e.g. by replacing the <send-message> binding with a macro that
calls both <source> and <send-message>. Just an idea, though. I've done
things somewhat like this in mutt, for completely different purposes. But
in discoursing from the armchair without actually trying to implement it,
there are very quite likely difficulties I'm missing here.

Anyway, personally, I would set $edit-headers and implement this in the
editor rather than in mutt. I hear vim is reasonably scriptable these
days, but I find Lisp to be a more elegant language... ;-)

But if you prefer to do your coding in C, that's great too. I just
thought you might want to avoid having to hack the mutt source code, as
that always takes much more time. (And carries a maintenance burden every
time a new version of mutt is released, as I suspect your chances of
getting a send-receipt implementation into vanilla mutt are very
small indeed...thankfully :)

Since it's not a feature I ever want to see in mutt, I'm afraid that
exhausts my interest in thinking about how to implement it.

Good luck!

Toby
-- 
Dr T. S. Cubitt
Quantum Information Theory group
Department of Mathematics
University of Bristol
United Kingdom

email: ts...@cantab.net
web: www.dr-qubit.org

Reply via email to