[imp] Customizing trailer filename with variable
Michael M Slusarz
slusarz at horde.org
Tue Aug 6 01:36:14 UTC 2013
Quoting Gary <witscher at gmail.com>:
> It would be better if I was able to choose which fortunes got
> appended to my sent emails dependent on the identity (or email
> addresses) of the sender. I don't want offensive fortunes attached
> to business emails, while for personal emails those fortunes are
> acceptable (and the other way around too). I could do this easily if
> I could use a variable in the trailer function that held either the
> identity or email address of the sender. That variable could be used
> to make the filename for the fortune text. The fortune program can
> easily be made to produce content specific text files that would
> match these names.
>
> Unfortunately, while I can do some programing, I'm not familiar with
> php at all. To test the value of what looked like a known variable I
> tried using $address, but it doesn't seem to have a value:
>
> public function trailer ($address)
> {
> return "\n address = " . $address;
> }
The trailer() hook is currently passed one variable: whether the
message is in HTML format (true) or plaintext (false).
It probably does make sense to provide an additional parameter to
trailer() to indicate the current identity. Although briefly looking
at the code, the location where we call the trailer hook does not have
ready access to that information.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the imp
mailing list