nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Multiple From Addresses.

2016-10-10 09:06:33
ken wrote:
can you share that bit of mh-format magic?  i'm sure it would work more
cleanly than my current technique of running sed on the draft.  :-)

Easy peasy:

%<{from}%?(getenv MH_FROM)%|%(void(localmbox))%>%(void(width))%(putaddr 
From: )

The {from} is there in case I want to use -from from the comp command line.
Obviously the environment variable is MH_FROM.  And I have aliases like this:

one more question about this:  how can i cause a format entry to
evaluate to nothing at all, not even a newline?

i'd like to do something similar to your example for Reply-to, for
instance (i have other uses in mind as well).  i've tried both this:

    %<(getenv MH_REPLYTO)%(void(width))%(putaddr Reply-to: )%|%>

and this:

    %<(getenv MH_REPLYTO)%<(nonnull)%(void(width))%(putaddr Reply-to: )%>%>

but neither of these attempts work -- i always get at least a blank line:

paul
=----------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 42.4 degrees)

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>