Solved

Setting up an Email Disclaimer

Posted on 2008-10-24
4
957 Views
Last Modified: 2012-06-27
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
Comment Utility
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.
0
 
LVL 2

Accepted Solution

by:
lmkandia earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a User Mailbox 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 Recipients >> Mailb…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now