|
-
May 16th, 2001, 08:15 AM
#1
Thread Starter
New Member
read the email addresses from a text file
Can anyone help ?
I have designed a form to send marketing emails its at
http://www.allefinance.com/cbsmarketingemail.asp
you can alter your content, email addresses, subject line as you wish
this isn't actually in vbscript yet by the way.
My boss wants to read the email addresses straight from a text file instead of us having to cut and paste a chunck load of email addresses with commas between them in the email address box.
Does anyone know how to do this using CDO vbscript ?
Shirley
-
May 16th, 2001, 02:53 PM
#2
Good Ol' Platypus
This will create the FileSystemObject in FF. Then you can open textstreams and read 'em in through there.
I will elaborate.
Code:
<%
Dim FF
Dim myFile
Set FF = System.CreateObject("Scripting.FileSystemObject")
Set myFile = FF.GetFile("addresses.txt")
Dim oTStream
Dim TheLine
Dim FirstLine
Dim Addresses
Set oTStream = myFile.OpenAsTextStream(1,-2)
Do While oTStream.AtEndOfStream <> True
FirstLine = FirstLine + 1
If FirstLine = 1 Then
TheLine = oTStream.ReadLine
Else
TheLine = TheLine + "," + oTStream.ReadLine
End If
Loop
oTStream.Close
%>
...
...
...
<INPUT TYPE="text" VALUE="<% =TheLine %>">
...
...
...
Just make sure addresses.txt looks something like this:
Last edited by Sastraxi; May 16th, 2001 at 03:03 PM.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|