Home > Ask the Domino Experts > LotusScript Questions & Answers > Can I stamp the "From" field with a LotusScript encryption agent without affecting the sender name?
Ask The Domino Expert: Questions & Answers
EMAIL THIS

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

Cregg Hardwick EXPERT RESPONSE FROM: Cregg Hardwick

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 11 September 2006

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?


>
EXPERT RESPONSE

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


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Lotus Notes Domino Email Encryption
    Use LotusScript to create encrypted replicas
    Can I encrypt an email sender's name?
    Encryption and privacy in Lotus Notes Domino
    Application for queueing non-delivery reports on hub mail server
    Notes/Domino 6 version of 'Discover Folder'
    CA buys iLumin, joins email archiving space
    Agent cannot encrypt e-mail message
    Encrypted mail in shared mail folders
    Server's error message says memory is full
    If someone steals an NSF file, can they read the data?

    LotusScript
    Display Lotus Notes user group membership details in a tree view
    Alternate version of @Command forwards subform via LotusScript
    Process large arrays in Notes forms without undue coding or testing
    How to use LotusScript to modify a Lotus Notes view selection
    Display a custom message box using a LotusScript-generated button
    Can I use LotusScript to merge cells in a Microsoft Word table?
    Debug Lotus Notes documents using extracted data
    Extracting attachments from a Lotus Notes rich-text field
    Programmatically replace the design of Lotus Notes databases
    Reading a binary field in an Oracle database with LotusScript

    LotusScript
    Can I use LotusScript to merge cells in a Microsoft Word table?
    Modifying LotusScript code for date and time handling
    Use DXL utilities for advanced replication settings in Notes
    Use LotusScript to create encrypted replicas
    Write a LotusScript agent to automate file attachments
    Troubleshooting a scheduled agent not running on a Global Notes Architecture (GNA) server
    Setting up local replication of a Lotus Notes database for offline employees
    Creating a link on an HTML page to a Microsoft Word attachment in a Lotus Notes database
    LotusScript to extract and move attachments to a Lotus Notes mailbox or file folder
    Copying a rich-text field with attachments to a Lotus Notes document

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice



    Lotus Notes Domino on Blackberry and mobile devices
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts