[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] replcomps - %friendly() with table lookup?

From: Ken Hornstein
Subject: Re: [Nmh-workers] replcomps - %friendly() with table lookup?
Date: Sun, 02 Sep 2012 11:12:23 -0400

>Is there a way to have friendly() [or some other function] doing some
>table / database lookup to come up with such an even more friendly()

Sure; just write the code! :-)

I was going to suggest some options involving the functions profile()
or getenv(), but I see they only take literals; there's no way to
build up a string and then look it up in the profile or environment
(otherwise you could do something like %(profile(addr{from})) ).
So, I'm kinda stumped as to how you could do this with stock nmh.

Ah, wait, ONE option comes to mind.  Are you using replyfilter?  If
so, you could add an extra option (or two) to your replyfilter
arguments in mhl.reply, and have replyfilter look up the "friendly"
name however you wish and write out the "Dear xxx" line for you.
If you're not using replyfilter ... well, why not? :-)

If you don't wish to do that ... you'd have to write a new format function.
That's not as bad as it sounds; I've put a lot of documentation in the
source code for those things.  Take a look at sbr/fmt_compile.c and


reply via email to

[Prev in Thread] Current Thread [Next in Thread]