Q
Problem solve Get help with specific problems with your technologies, process and projects.

Can I stamp the "From" field with a LotusScript encryption agent without affecting the sender name?

A Lotus Notes administrator/developer is running incoming email through a LotusScript encryption agent, but can't get the signer of the agent to stop showing up in the "From" field after the agent finishes processing the email. SearchDomino.com LotusScript expert Cregg Hardwick helps him troubleshoot his options.

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.

I want the sender name stamped in the "From" field when it is getting posted to the mailbox.

Do you have any LotusScript solutions?

VIEW MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A.

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.

MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A:

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.

—Chris B.

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Learning Guide: LotusScript development
  • FAQ: LotusScript advice
  • Reference Center: Messaging and encryption resources
  • Reference Center: LotusScript tips and resources
  • This was last published in September 2006

    Dig Deeper on Lotus Notes Domino Email Encryption

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    Start the conversation

    Send me notifications when other members comment.

    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchWindowsServer

    Search400

    • iSeries tutorials

      Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

    • V6R1 upgrade planning checklist

      When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

    • Connecting multiple iSeries systems through DDM

      Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

    SearchDataCenter

    SearchExchange

    SearchContentManagement

    Close