EchoAlertcom
IS-IT--Management
Hello,
I have a script that isn't working and need a little guidance.
It is taking a sting that looks like:
and splitting the string into an array then looping sending mail using CDONTS. I have posted the page below.
The line that is identified as producing the error is line
19.
varMail.To = MyArray(I)
Please help me with what is going wrong.
Sincerely.
Steve
I have a script that isn't working and need a little guidance.
It is taking a sting that looks like:
Code:
email@address.com, email2@address.com, email3@address.com
and splitting the string into an array then looping sending mail using CDONTS. I have posted the page below.
The line that is identified as producing the error is line
19.
varMail.To = MyArray(I)
Code:
<html>
<head></head>
<body>
<%
Dim myString, myArray, I, varMail
MyString = Request.Form("fldEmailList")
MyArray = split(MyString,",")
Set varMail = Server.CreateObject("CDONTS.Newmail")
varMail.From = "sfunk@cfl.rr.com"
varMail.Subject = "Test 123"
varMail.Body = "test 23456"
For I=0 to Ubound(MyArray)
varMail.To = MyArray(I)
varMail.Send
Next
Set varMail = Nothing
%>
</body>
</html>
Please help me with what is going wrong.
Sincerely.
Steve