include file within script

include file within script

am 17.04.2008 00:10:40 von Shank

I have the below code to auto-email a customer.

What is the syntax to include a file in the email?

HTML = HTML & "...just some text...
"
HTML = HTML &
HTML = HTML & ""
HTML = HTML & ""

thanks

Re: include file within script

am 17.04.2008 03:05:03 von Bob Milutinovic

"shank" wrote in message
news:eRLZ95AoIHA.4292@TK2MSFTNGP04.phx.gbl...
>I have the below code to auto-email a customer.
>
> What is the syntax to include a file in the email?
>
> HTML = HTML & "...just some text...
"
> HTML = HTML &
> HTML = HTML & ""
> HTML = HTML & ""
>
> thanks
>

sIncludeFile = "somefile.txt" ' modify as appropriate
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
set fRead = oFSO.OpenTextFile(sIncludeFile)
sReadText = fRead.ReadAll
fRead.Close
set fRead = nothing
set oFSO = nothing

HTML = HTML & "...just some text...
"
HTML = HTML & sReadText
HTML = HTML & ""
HTML = HTML & ""



HTH,

- Bob.