token_replace : operate on two different 'user' entities? I've got an e-mail message with the following contents:

Dear [receiver:name],

[sender:name] would like to recommend the following link [node:url].


Now, I could certainly implement hook_tokens() and make sure that all 'receiver' and 'sender' tokens are replaced, but these entities are plain old 'user' objects. It would be great if I could just use the functionality already available, but as far as I can see, that requires me to specify replacement patterns in the format [user:name]. However, that doesn't work as it would mix up the sender and receiver.

Any idea if this is doable withouth having to reimplement the 'user' replacement logic?
I don't think you can do what you require as the data fed to [user:name] belongs to the currently logged in user. Sender and receiver would be different objects in your database.