To accomplish what you want, you have to set the principal field of the outgoing email messages. This is easier to do in LotusScript than Formula language. In LotusScript, to send a minimal email, you could use something like this:
Dim Session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim email As NotesDocument
Set email = db.CreateDocument
email.form="Memo"
email.principal="My Favorite User"
email.subject="subject"
email.body = "body"
Call email.Send(False,"Addressee or
array of addressees")
In Formula language, it's a little trickier. You cannot set field contents directly. Instead, you pass them to @Mailsend as arguments. If @Mailsend does not have the argument you need, then you have to have the value set in the Lotus Notes document before you send it, and then use the @Mailsend parameter that causes certain fields to be included. Depending on your application, this may or may not be practical.
If your Domino Web application is creating a document, and that document is the one that contains the button and that is being sent out, then simply add a computed field called principal to the form. Give this field a formula to set its value to the readable value you would like. Be sure to note that in Lotus Notes, this value does not have to correspond to a real, addressable user. But if it doesn't, make sure you also add a "Replyto" field which does.
Now to your @mailsend command, add the "bodyfields" argument to tell it to include the principal and "Replyto" fields calculated when the document is created:
@MailSend( "sendTo" ; "" ; "" ; "subject" ;
"remark" ; "principal":"replyto" )
Do you have comments on this Ask the Expert Q&A? Let us know.
Related information from SearchDomino.com:
Tip: Using Formula language code to sort Notes messages by subject
Tip: Show unread marked Lotus Notes email messages using LotusScript
Expert Response: Track incoming and outgoing email messages
|