Solved

Setting up an Email Disclaimer

Posted on 2008-10-24
4
961 Views
Last Modified: 2017-02-03
I followed the steps in KB317680 http://support.microsoft.com/kb/317680 to setup an email disclaimer on outgoing SMTP email.  Emails that are sent in plain text show the disclaimer fine.  Emails sent in HTML format do not show the disclaimer.  Attached is the EventSinkScript.vbs.  Any ideas on why this is not working?
<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
   TextDisclaimer = vbCrLf & "Security Warning:  This message is being sent over an insecure medium.  Recipients should not reply to this message with sensitive or confidential account information."
 
   HTMLDisclaimer = "<p></p><p>Security Warning:  This message is being sent over an insecure medium.  Recipients should not reply to this message with sensitive or confidential account information."
 
   If Msg.HTMLBody <> "" Then
      'Search for the "</body>" tag and insert our disclaimer before that tag.
      pos = InStr(1, Msg.HTMLBody, "</body>", vbTextCompare)
      szPartI = Left(Msg.HTMLBody, pos - 1)
      szPartII = Right(Msg.HTMLBody, Len(Msg.HTMLBody) - (pos - 1))
      Msg.HTMLBody = szPartI + HTMLDisclaimer + szPartII
   End If
 
   If Msg.TextBody <> "" Then
      Msg.TextBody = Msg.TextBody & vbCrLf & TextDisclaimer & vbCrLf
   End If
    
   'Commit the content changes to the transport ADO Stream object.
   Msg.DataSource.Save ' Commit the changes into the transport Stream
 
   EventStatus = cdoRunNextSink
End Sub
</SCRIPT>

Open in new window

0
Comment
Question by:tbeck1983
4 Comments
 
LVL 8

Expert Comment

by:DenverRick
ID: 22799186
If you want some reasonably priced software that has great features to handle this for you, try Exclaimer Mail Utilities.  It's fairly brainless, works well, and is extremely powerful.

I gave up on trying to use my own sinks a couple of years ago and fell in love with these guys at Exclaimer.
1
 
LVL 2

Accepted Solution

by:
lmkandia earned 250 total points
ID: 22799460
Have you tried simply using the canned Microsoft sink?
This would at least verify that it isn't anything that YOU did to the vb code - editing error for instance.

You ran both the following lines:

cscript smtpreg.vbs /add 1 onarrival SMTPScriptingHost CDO.SS_SMTPOnArrivalSink "mail from=*@your-domain-here.com"

cscript smtpreg.vbs /setprop 1 onarrival SMTPScriptingHost Sink ScriptName "C:\EventSinkScript.vbs"
and received no errors upon completion of both commands (careful about the path to YOUR copy of the MS VBS script).

If you're using Outlook to send your email to an exchange server (where you're doing the sink), it may not work.  But there is a workaround:

http://support.microsoft.com/kb/273233
Have you tried Outlook Express?
0
 
LVL 15

Assisted Solution

by:tenaj-207
tenaj-207 earned 250 total points
ID: 22799517
Microsoft has multiple ways of doing things and it looks like you used this method
http://support.microsoft.com/?kbid=317680

Well, here's another way to do it.
http://support.microsoft.com/?kbid=317327

If at first you don't succeed, try it from another angle.
0
 
LVL 4

Expert Comment

by:FourBeers
ID: 22799625
I think you may have left out a </P> tag at the end of you HTML text - try it with a </P> at the end and it should work.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question