473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

vbscript email disclaimer

1
could anyone tell me if there is anything wrong with this script we seem to be unable to make the script/eventsink work on our exchange2003 server.

<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
TextDisclaimer = vbCrLf & "DISCLAIMER:" & vbCrLf & "The information contained in this e-mail may be confidential and may also be legally privileged. It is intended solely for the addressee(s). If you are not the intended recipient then please delete forthwith. If a quotation is included, it is provided for budgetary purposes only and is subject to status. Quotes exclude VAT and are correct at time of quotation, but may change at any time. Emails are not guaranteed to be secure, the contents of this message may have been altered prior to delivery, and it is your responsibility as the recipient to have adequate virus protection. Any views or opinions expressed are those of the sender and may not reflect the views or opinions of brigade-electronics.com PLC which accepts no liability in respect thereof. If you have received this e-mail in error please notify the postmaster immediately by e-mail to postmaster@company.com."

HTMLDisclaimer = "<p></p><p>DISCLAIMER:<br>The information contained in this e-mail may be confidential and may also be legally privileged. It is intended solely for the addressee(s). If you are not the intended recipient then please delete forthwith. If a quotation is included, it is provided for budgetary purposes only and is subject to status. Quotes exclude VAT and are correct at time of quotation, but may change at any time. Emails are not guaranteed to be secure, the contents of this message may have been altered prior to delivery, and it is your responsibility as the recipient to have adequate virus protection. Any views or opinions expressed are those of the sender and may not reflect the views or opinions of brigade-electronics.com PLC which accepts no liability in respect thereof. If you have received this e-mail in error please notify the postmaster immediately by e-mail to postmaster@company.com"

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
http://www.thescripts.com/forum/newt...wthread&f=132#
Decrease Size 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>

cheers
Novus
Sep 24 '07 #1
0 1050

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Valentina Boycheva | last post by:
Thanks for the reply. I already have "Learning Python" from Mark Lutz and David Ascher, which covers 2.3 (I am in 2.4). However, it seems like heavy artillery to me. What I want is, for instance,...
4
by: Colin Steadman | last post by:
I'm trying to create a VBScript using ASP. However I'm having problems getting data from session variables into the right places. The example I have copied below works, however I need to replace...
5
by: gpence | last post by:
!!! Newbie question warning !!! I am somewhat familiar with javascript's ability to "access" the browser's favorites list -- for example, using window.home() will take you to the default URL --...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
5
by: Ben Schumacher | last post by:
Has VbScript become obsolete in Asp.Net 2.0? I can't seem to find any documentation on using VbScript with Asp.Net 2.0. Does this mean that the three years of knowledge I have using VbScript is...
4
by: sparky | last post by:
I've been working on an ASP driven website, on a client's web hosting space. One of the project requirements was the ability for the client to be able to upload files through an HTTP form. No...
4
by: client site dll in vbscript | last post by:
Hi i have one dll on client site,i want to use it in aspx page, on clinet site Is it possible or not .Please tell me the solution Please email me at indipren@hotmail.com Regarda Indi
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
7
by: dkiernan | last post by:
I am stumped. I have several websites running on a 2003 IIS6 box, all running basically the same code (each site has its own home directory and copy of the code). All are running in the same App...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.