Solved

Setting up an Email Disclaimer

Posted on 2008-10-24
4
964 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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