Can I stamp the "From" field with a LotusScript encryption agent without affecting the sender name?
I am using the EncryptOnSend method to send encrypted mail to the recipient through an agent. If the recipient is outside the SMTP domain, the "From" address automatically comes as the signer of the LotusScript agent.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I want the sender name stamped in the "From" field when it is getting posted to the mailbox.
Do you have any LotusScript solutions?
If I understand you correctly, no I don't. It sounds like what you want to do is have various users generate Lotus Notes email that is somehow routed to a LotusScript agent, which encrypts it and passes it on. You do not want the email to appear to be from the signer of the LotusScript agent doing the encryption.
You will not be able to accomplish this within Lotus Notes. The "From" field will ALWAYS be set to the owner of the code that executes the send method -- in this case, your LotusScript agent. Now, the agent can modify the text of the message to begin with a header stating who the message came from…
(Doc is the document which presumably has been delivered to a mail-in database and is being processed by an agent which is about to encrypt it and send it?)
Dim body As NotesRichTextItem Set body=doc.GetFirstItem("Body") Dim NewMemo As NotesDocument Call Doc.CopyAllItems(NewMemo) Call newmemo.removeitem("Body") Dim newBody As New notesRichTextItem(NewMemo,"Body") Call newBody.AppendText ("This message was sent by "+doc.from(0)+" and encrypted by the super deluxe encryptor dohickey.") Call newBody.AddNewline(2) Call newBody.AppendRTItem(body)
Within Lotus Notes, you can add a "Principal" field, which the Lotus Notes mailbox will report as the sender, but which other email systems will generally ignore. You cannot change the "From" field. Although others claim to do it, running an agent inside mail.box is such a bad idea that I'm not even going to discuss it.
If this is an absolute showstopper, you might consider writing your agent in .NET or Visual Basic. It's easy to access a Lotus Notes document through COM, and you can change the apparent sender pretty easily when using the System.Mail SMTP API. But I don't know if this would be feasible, since you want to employ Lotus Notes encryption.
I've accomplished this in the past by saving a Lotus Notes document with LotusScript in mail.box and stuffing the From field with the alias. I've used this technique since Lotus Notes R4 and it works great. The only downside is you must have access to the Domino server for this to work.
Do you have comments on this tip? Let us know.
Related information from SearchDomino.com:
Dig Deeper on Lotus Notes Domino Email Encryption
Related Q&A from Cregg Hardwick
A user wants to know if it's possible for LotusScript to read an attachment in a Notes document without first detaching it. Find out our expert's ...continue reading
Learn about different options using LotusScript code and Formula language to customize the principal field of outgoing Lotus Notes email messages.continue reading
Read about merging cells in a Microsoft Word table using LotusScript and an Excel example, along with the thought process that goes along with it.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.