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?


>

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
    What is Notes 8.5's DAOS (Domino Attachment and Object Storage) feature?
    Give external users access to workflow-based Notes Domino applications
    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

    LotusScript
    LotusScript finds the first occurrence of a string from the right
    Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
    Search Microsoft Active Directory with LotusScript
    Three steps to trap and handle save conflicts with LotusScript
    Troubleshoot agents by displaying LotusScript variables online
    LotusScript sorts lists alphabetically
    Run or restart Notes/Domino agents via text messages
    LotusScript code rebuilds corrupted busytime.nsf file
    Soft-code item names to facilitate LotusScript management
    LotusScript agent automates selective mail file replication

    LotusScript
    Can you use LotusScript to read a text file attached to a Notes doc?
    Customize the principal field of outgoing email messages
    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

    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 technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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