Manage Learn to apply best practices and optimize your operations.

Mail Signature Using A Profile Document

The signature is a new R5 feature. The mail template modification below does
exactly the same thing using a profile document.

It automatically appends a footer when:
- creating a new memo
- replying to a memo
- replying with history to a memo
- forwarding a memo
This feature can be activated and desactivated through the Mail Profile
document.
Design modification:

1. Forms:
new form added: (Mail Profile):
Form Alias: MailProfile
Type: Document
Window Title Formula: SELECT "Mail Profile"
Include in Compose Menu: Yes
Include in Query by Form: No
Default Database Form: No
Automatically Refresh Fields: No
Mail New Documents When Saving: No
Store Form In Documents: No
Inherit Default Field Values: No
Updates Become Responses: No
Retain Prior Versions As Responses: No
Activate Objects When Composing: No
Activate Objects When Editing: No
Activate Objects When Reading: No
Document Encryption Keys: [None Assigned]
Composed Documents May Be Read By: All Users
Form May Be Composed By: All Users
Field: SIGN_YN
Datatype: Keywords
Help Description: [Not Assigned]
Field Type: Editable
Keyword User Interface: Radio Buttons
Allowable Keywords: Yes;No
Sign When Mailing/In Section: No
Encryption: Disabled
Update Requires Editor Access: No
Default Value Formula: "No"
Field: MailSignature
Datatype: Text
Help Description: [Not Assigned]
Field Type: Editable
Sign When Mailing/In Section: No
Encryption: Disabled
Update Requires Editor Access: No

2. Memo form:
in the PostOpen event of the Memo (Form), addition of a LotusScript line,
after the Call EmailOpen function::

'*** added for signature
Call AddSign
If uidoc.EditMode = True Then Call uidoc.GotoField( "SendTo" )
'*** end of added for signature

3. Reply form:
in the PostOpen event of the Memo (Form), addition of a LotusScript line,
after the Call EmailOpen function:

'*** added for signature
Call AddSign
If uidoc.EditMode = True Then Call uidoc.GotoField( "Body" )
'*** end of added for signature

4. Reply with History form:
in the PostOpen event of the Memo (Form), addition of a LotusScript line:

'*** added for signature
Call AddSign
If uidoc.EditMode = True Then Call uidoc.GotoField( "Body" )
'*** end of added for signature

5. Script Libraries:
Modification of the EmailProcessing Script: addition of a new sub routine

Sub AddSign
Dim l,n As Integer
Dim Footer As String
eol = Chr(13) & Chr(10)

If uidoc.InPreviewPane Then Exit Sub
Set db = session.CurrentDatabase
Set profile = db.GetProfileDocument("MailProfile")
l = Len (Profile.MailSignature(0))
n = 1
If (uidoc.isnewdoc And Profile.SIGN_YN(0) = "Yes" And l <> 0) Then
Call uidoc.GotoField( "Body" )
Do
Footer = Mid (Profile.MailSignature(0), n , 100)
If Footer <> eol Then Call uidoc.InsertText(footer$)
n = n+100
Loop Until n > l
End If
End Sub


6. New Shared Agent: this LotusScript agent is used to create the mail profile:
Name: Mail Tools\Mail Profile
When should this agent run: Manually from Action Menu
Which document(s) should it act on: Run once (@Commands may be used)

LotusScript:
(Options): no LotusScript
(Declarations):

Dim profile As NotesDocument
Dim db As NotesDatabase
Dim session As NotesSession
Dim ws As NotesUIWorkspace

(Initialize)

Sub Initialize
Set session = New NotesSession
Set db = session.CurrentDatabase
Set profile = db.GetProfileDocument("MailProfile")
Set ws = New NotesUIWorkspace
profile.save True, True, True
ws.EditProfile("MailProfile")
End Sub

Terminate: no LotusScript

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

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

SearchContentManagement

Close