Home > Domino Tips > Administrator > Mail > Creating Disclaimers for Different Business Units
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MAIL

Creating Disclaimers for Different Business Units


Erna Schmidt
03.27.2001
Rating: -3.36- (out of 5)


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


It is easy implementing a automatic disclaimer for you company. But what do you do when the business do not want the diclaimer underneath official business mail, or each business unit within the company need to have a different business disclaimer containing e.g. different directors for each business unit. They even have a choice of language for the ooficial diclaimer - depending on the language of their client!

This tip will show you how to create a automatic disclaimer containing either the default company disclaimer, or an Official disclaimer and let users choose the default business unit and language and change it any time they need.



Code

This code will create a table at the top of each mail memo (or reply form). When the user first enters Notes the default diclaimer will be the "DEFAULT DISCLAIMER TEXT" (used for users sending mail to friends etc.)

The user can select between Default or Official Disclaimer, depending on the contents of the mail. Once Official Disclaimer are selected, another choice appears for the user to select the business unit to which he belongs, as well as the language of choice. All of these choices are saved in Environment variables in the Notes.ini so the user only has to switch between Official mail or default mail.

Do the following on all 3 forms:Memo form; Reply form and Reply with History form:
-- Add a hidden field: disclaimer with default value 0. (0 = No disclaimer has yet been added, 1= disclaimer already added). This prevents the disclaimer from being added more than once e.g. when mail adressing errors occur etc.
-- Add Disclaimer table at the top of the form with the following fields:

OfficialMail:
Radio button field with values "Yes" or "No". If this is the first time the user use this template, set the default for OfficialMail to "No", else get the previously used values from the environment variables in the Notes.i


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


RELATED CONTENT
Mail
Run or restart Notes/Domino agents via text messages
How to create mail files using a LotusScript agent
How to turn off the message recall feature in Lotus Notes 8
Domino server setting and email policy tricks admins must know
Top 10 Lotus Notes/Domino administration tips of 2008
Understanding a Lotus Notes Smart Upgrade rollout
Bringing MailRule documents back into view
Use SMTP outbound authentication to relay hosts in Lotus Notes Domino 8
Notes/Domino 6 version of 'Discover Folder'
Five tips to improve email performance

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


ni.
Default Value: @If(@Environment("OfficialMail") = "";"No";@Environment("OfficialMail"))
OfficialGroup:
This field is hidden when OfficialMail = "No"
Allow the user to select his Business Unit for Official Mail. Dialog list containing all official business units (D,E,F,G). The default business unit is "G", or get the previously used value from the Notes.ini environment variable "OfficialGroup"
Default value: @If(@Environment("OfficialGroup") = "";"G";@Environment("OfficialGroup"))
DisclaimerLang:
Radio button field with language choices - in this case English or Afrikaans
This field is hidden when OfficialMail = "No"
Allow the user to select his choice of language for his client. The Default is "English" or get the previously used value from the Notes.ini environment variable "OfficialLang"
Default Value: @If(@Environment("DisclaimerLang") ="";"English";@Environment("DisclaimerLang"))

Some users are not allowed to use the Official Disclaimer. The table is hidden for them and the default disclaimer will be added to all mail sent by them. In this case the distinction is made on the OU2 field:
-- Make the table hidden when ou2="A", "B","C" etc.
-- In the PostOpen event add the following code:
If userName.IsHierarchical Then
ou = username.orgunit2
If ou = "" Or ou = "A" Or ou = "B" Or ou = "C" Then
Call uidoc.fieldSetText("OfficialMail", "No")
Call uidoc.fieldSetText("DisclaimerLang", "English")
Call uidoc.Refresh
End If
End If

Now that we have all the information we need to add the disclaimer, we add the following code to the QuerySave Event of the form (remember the Memo form, Reply Form AND Reply with History form):

Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim Disclaimer As String
Dim OfficialMail As String
Dim OfficialGroup As String
Dim DisclaimerLang As String
Dim session As New notessession
Set uidoc = ws.currentdocument
Set doc = uidoc.document
'Get the values for the disclaimer from the front-end document:
OfficialMail = uidoc.FieldGetText( "OfficialMail" )
OfficialGroup = uidoc.FieldGetText( "OfficialGroup" )
DisclaimerLang = uidoc.FieldGetText( "DisclaimerLang" )
'Save the values in the NOtes.ini so that the user only has to choose once
Call session.SetEnvironmentVar("OfficialMail",OfficialMail)
Call session.SetEnvironmentVar("OfficialGroup",OfficialGroup)
Call session.SetEnvironmentVar("DisclaimerLang",DisclaimerLang)

Disclaimer = ""
'Do this only if the discaimer has not been added to the mail yet:
If uidoc.fieldgettext("Disclaimer") = "0" Then
'The user do not want to use the official diclaimer:
If OfficialMail = "No" Then
Disclaimer = |DEFAULT DISLCAIMER TEXT.|
Else
'For the official diclaimer, determine the language set by the user:
If DisclaimerLang = "A" Or DisclaimerLang = "Afrikaans" Then Disclaimer = |OFFICIAL DISCLAIMER IN AFRIKAANS.|
Else
Disclaimer = |OFFICIAL DISCLAIMER IN ENGLISH.|

End If
'Determine the Business Unit and add the Directors for the business unit to the dislcaimer field already build up in the correct language:
Select Case OfficialGroup
Case "D"
Disclaimer = Disclaimer & |

Directors for Business Unit D.|
Case "E"
Disclaimer = Disclaimer & |

Directors for Business Unit E.|
Case "F"
Disclaimer = Disclaimer & |

Directors for Business Unit F.|

Case Else
Disclaimer = Disclaimer & |

Directors for Business Unit G.|
End Select

End If
'Add a line at the top of the disclaimer to ditinguish between mail text and disclaimer text:
Disclaimer = |

***************
| & Disclaimer
'Now add the disclaimer to the bottom of the mail:
Call uidoc.fieldappendtext("Body", Disclaimer)
'Change the value of the hidden disclaimer field to ensure disclaimer only set once:
Call uidoc.FieldSetText("Disclaimer","1")
End If

And wholla: an easy system that can also be changed easily to incorporate new business units or changes to any of the disclaimers or directors.


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
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