Showing posts with label Mail Template. Show all posts
Showing posts with label Mail Template. Show all posts

Friday, 14 November 2014

Add Disclaimer to Mail Signature in IBM SmartCloud Notes (Custom Implementation)

Requirement:

A company disclaimer is required to be added to all the Emails sent across the organization and outside using SmartCloud Notes Client and iNotes.

Challenge:

SmartCloud Notes doesn’t support functionality of Message Disclaimer.

 

Solution:

This solution is a work around and not really a Cloud based integration.

We’ll be using a LotusScript Agent to modify the Mail Signature for Notes Client, iNotes – Plain Text and iNotes – Rich Text and append the Disclaimer for all users.

Assumption:

The Administrator has access to all the MailFiles in SmartCloud Notes via Template Modification.

 

Code:

Option Public
Option Declare

Const DISCLAIMER = |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Disclaimer :
This e-mail and any attachments thereto are intended for the sole use of the recipient(s) named above and may contain information that is confidential and/or proprietary to the ABC Pvt. Ltd. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication, or dissemination in any form) by persons other than the intended recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Sub Initialize
    Dim s As New NotesSession
    Dim docP As NotesDocument
    Dim db As NotesDatabase
    Dim dociNotes As NotesDocument
    Set db = s.CurrentDatabase
    Set docP = db.GetProfileDocument("CalendarProfile")
    Set dociNotes = db.Getprofiledocument("iNotesProfile")
    If docP.SignatureInserted Then 'Avoid repeated insert of signature
        'Plain Text Signature
        docP.Signature_1 = docP.Signature_1(0) & Chr(10) & DISCLAIMER
        'HTML iNotes Signature
        dociNotes.HTMLSignature = dociNotes.HTMLSignature(0) & Chr(10) & DISCLAIMER
        'Notes RichText Signature
        Dim rtItem As New NotesRichTextItem(docP, "Signature_Rich")
        Call rtItem.appendtext(DISCLAIMER)
        docP.SignatureInserted = True
        Call docP.Save(True,False)
        Call dociNotes.save(True, False)
    End If
End Sub

Monday, 7 January 2013

Lotus MailFile Template Modification: Prevent changes in received emails

 

In the default Lotus Notes Mail template, users can edit the received emails and modify the content. To prevent the same, following customization is required in template.
Edit "Memo" and "Reply" form in the designer                                

                                                                            
  change "QueryModeChange" event, by adding this code:                 
                 
  If  (Not source.editmode And source.document.HasItem("PostedDate"))   Then
       continue = False                                                         
       Exit Sub                                                                 
  End If                                                                    
                                                                            
Change "QueryOpen" event, and towards the top, add:                         
                                                                            
 If (Not (source.isnewdoc) And source.editmode ) Then        
     If (source.document.HasItem("PostedDate") ) Then           
          Continue = False                                          
          Exit Sub                                                  
     End If                                                     
 End If