Hi,

I've been experimenting with the trailer file_get_contents feature. I have fortune, running under cron, updating a text file with a new a fortune each time. The file is appended to my sent email by the trailer function in imp/hooks.php. This is exactly what I want it to do, except for one problem.

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;
}

This appends "address = " to my sent email.


Anyone know of a way to accomplish what I have in mind? Or maybe there is a more direct and easier method that will give me the same results?

TIA,
Gary

Attachment: pgp0lrXYSdQ3D.pgp
Description: PGP Digital Signature

-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Reply via email to