It's officaially time for me to stop and ask for directions! FYI I'm new
to VBscript and aim to create scripts to automate some of the things i
wish to do.
Heres my current task.
I need to test a spam filter using content contained in about 2000
seperate .txt files. I have successfully gotten my script to work with
the first txt file. But I have NO idea how to make the script process
each txt file into a seperate outgoing email.
Here's the code:
------------------------------------------------------------------
----------
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
("spamfile1.txt", ForReading)
strResponses = objTextFile.ReadAll
Set objEmail = CreateObject("CDO.Message")
objEmail.From = InputBox( "Type a senders address for spam here" )
objEmail.To = InputBox( "Type Target email address for spam here" )
objEmail.Subject = "Spam filter test"
objEmail.Textbody = strResponses
objEmail.Send
MsgBox "Your SPAM has been sent to " & _
objEmail.To
objTextFile.close
------------------------------------------------------------------------
------------
As you can see the current script is setup to only process 1 txt file
and 1 email. Again my goal is for the script to process each text file
(2000 of them) and then generate 2000 seperate emails which i will
direct at my content filter for testing.
Any help would e GREATLY appreciated and I apologize in advance if I
have asked a completely rudementary question. I am testing this for a
school that I volunteer IT time for so it is a non profit objective.
Thx again-
--
Posted via http://dbforums.com