Disclaimer and Querysave Event

In an attempt to add disclaimers to MIME formatted messages from Notes Clients I have added the following code (Source: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/5992ce838e9b3a2685256ce900478510?OpenDocument&Highlight=0,disclaimer) to the mail template Memo form Querysave event:

Dim session As New NotesSession

InternetMail=False



SendTo=Source.FieldGetText("SendTo")

If Instr(SendTo,".") >0 And Instr(SendTo,"@") Then InternetMail=True

CopyTo=Source.FieldGetText("CopyTo")

If Instr(CopyTo,".") >0 And Instr(CopyTo,"@") Then InternetMail=True



If InternetMail Then

	BdyText = Source.FieldGetText( "Body" )

	If Instr(BdyText,"This e-mail and any") = 0 And Instr(BdyText,"please notify (this company") =0 Then

		Call Source.FieldAppendText ("Body",Chr(10))

		Call Source.FieldAppendText ("Body",Chr(10))

		Call Source.FieldAppendText ("Body","------------------------------------------------------- ")

		Call Source.FieldAppendText ("Body",Chr(10))

		Call Source.FieldAppendText ("Body","This e-mail and any accompanying attachments are confidential.  The information")

		Call Source.FieldAppendText("Body"," is intended solely for the use of the individual to whom it is addressed.  Any review,")

		Call Source.FieldAppendText("Body"," disclosure, copying, distribution, or use of this e-mail communication by others is ")

		Call Source.FieldAppendText("Body","strictly prohibited. If you are not the intended recipient, please notify (this company)")

		Call Source.FieldAppendText("Body"," immediately by returning this message to the sender and deleting all copies.  Thank you for your cooperation.")

		

	End If

End If

So here is the problem. The disclamer is added to the email but only after it is sent to the router. The disclamer shows up in saved sent mail but is not in the actual email when it arrives at it’s destination. Does anyone know of another event or place where I can use this code to add a disclaimer to the email body before it is sent to the router? I’ve tried almost every event available to no avail. Thanks in advance.

Richard Bilson

Subject: Disclaimer and Querysave Event

add.

Call Source.Refresh 

as the first statement of the Lotusscript to ensure the TO & CC fields are correct.

also, add the line at the end to show the addition on screen

I know the code works as I use it (and wrote it). I have also had many emails from people saying that it works well

David Jamieson

david.jamieson@semplefraser.co.uk

Subject: RE: Disclaimer and Querysave Event

Thank you very much for the suggestion (it worked) as well as the original disclaimer code. –

Richard Bilson

Subject: Glad it worked