Why we write doc.principal in mail send code?

what is the use of document.principal in mail send?

Rupesh

Subject: why we write doc.principal in mail send code?

The ‘Principal’ field is what will show in a user’s inbox in the Who column. This will also be the name used if the user replies to the email.

If you are generating an email via lotusscript, the email sender defaults to whoever signed the agent (for scheduled agents) or runs the code (for action buttons, etc).

If you set the Principal field, then the email will show in the inbox as sent by that person. The agent signer / code executer will display as the ‘Sent By’ person in the email header.