Home > Ask the Domino Experts > Domino Development Questions & Answers > Agent cannot encrypt e-mail message
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Agent cannot encrypt e-mail message

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

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: 19 July 2005
I have an agent which takes an inbound e-mail and forwards it. The forward recipient e-mail address is taken from the Subject field (the actual subject is left in the field). This works, but I cannot get the message to encrypt. This should work, since if I define the recipient in the script, it does. But when I'm parsing it out from the subject field, it won't encrypt. What am I missing?

Here's the agent script:

  
REM Recipient is split from Subject field. 
REM Agent is set to run before new mail. 
REM Agent security is set to 2. 
  
Sub Initialize 
            Dim session As NotesSession 
            Set session = New NotesSession 
            Dim db As notesdatabase 
            Dim Maildoc As notesdocument 
            Set db = session.CurrentDatabase 
            Dim doc As NotesDocument 
            Set doc = session.DocumentContext 
            
            Dim ret As Variant 
            Dim teststr As String 
            Dim delim As String 
            teststr = doc.Subject(0) 
            delim = "&" 
            ret = Split(teststr, delim) 
            Print ret(0) 
            Print ret(1) 
            
            Set Maildoc = New NotesDocument( db ) 
            Call doc.CopyAllItems( Maildoc, True )     
            Maildoc.From =  doc.From(0) 
            Maildoc.Form = "Memo"           
            Receipient = ret(0) 
            Maildoc.Subject           = ret(1) 
            Call Maildoc.Save( True, True ) 
            Maildoc.EncryptOnSend = True 
            Call Maildoc.Send (False, recipient) 
            Call Maildoc.RemovePermanently(True) 
            
End Sub 


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


RELATED CONTENT
Domino Development
Can I create and copy Microsoft Excel spreadsheets with LotusScript?
'Illegal circular use: Audit Trail' error when opening Lotus Notes docs
How to make computed fields recalculate
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
Adding an action to the Lotus Notes right-click menu
Writing temporary text files that email as attachments
Trapping the on-click event of a radio button
Copying a form object using LotusScript
Connecting to a remote DB2 server with LEI

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 stamp the "From" field with a LotusScript encryption agent without affecting the sender name?
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
Encrypted mail in shared mail folders

Lotus Notes Domino Agents
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007
How to export data from a Lotus Notes database to a CSV file

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


Encryption must know who you're sending to and also must be able to find their public key (in the Person document in the address book). This can fail either because a) the recipient's Person information is not available in the context where the code is running, or b) because the name is not recognized sufficiently well to find the person record.

If the agent works with a hardcoded name and fails with a calculated name in the same context, reason b is more likely. If the calculated recipient name is an Internet address rather than a Notes username, for instance, the Send method probably can't match it up with a Notes username. In that case, you will probably need to program a function yourself to find the corresponding Person record and use it to translate the address into a fully qualified Notes username.

Do you have comments on this Ask the Expert question and response? Let us know.




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