Sending an email on behalf of another name

I've finally worked out how to send an email from an agent and make it appear to be coming from whomever I want. This approach does not use the principal field or put messages directly in the mail.box.

What you do is have an agent that creates a document containing the info you want to send out. That agent then sets the $OnBehalfOf field on a second agent to be the 'from' address of the message. It then runs the agent (on behalf that person) on the server to send the message.

The code uses the wonderful DatabaseDesign class by Damien Katz to perform the magic.

Let me know if you want the code.