?
Solved

Setting up an Email Disclaimer

Posted on 2008-10-24
4
Medium Priority
?
974 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 750 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 750 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
New style of hardware planning for Microsoft Exchange server.
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
To show how to generate a certificate request 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 >> Certificates…
Suggested Courses

762 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