Solved

Setting up an Email Disclaimer

Posted on 2008-10-24
4
963 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we show how to create a Contact 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 >> Contact ta…
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…

756 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