Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One more mail list question

Status
Not open for further replies.

mtarby

Programmer
Feb 19, 2003
89
US
Thanks to everyone who gave me the advice earlier about CDOSYS - I do plan on trying that out when I get some time. I did get ASP Email working with my script to the point where I can send mail, but now I get an error before something finishes processing:

Code:
for i = 0 to last singlemail = split(maillist(i), delimiter, -1, vbtextcompare)
if mailpattern(singlemail(0)) then
mailresult = SendMail(Request.Form("from"), singlemail(0),	Request.Form("subject"), lettext)
if mailresult then
Response.Write singlemail(0) & ": SENT" & vbCrlf
else
Response.Write singlemail(0) & ": MAIL NOT SENT"
end if
end if
next
Response.Write "<b>Processing completed!</b>"
on error goto 0

After the SENT, I get:

Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 0]'

Any suggestions?

Thanks!
 
It's saying that you're requesting an item out of an array at subscript 0 and there's no such element in the array.

That means that there's nothing ending up in singlemail(0) after the split. That split with the -1 offset looks suspicious, but I'm not sure what the string looks like that it's splitting, so I can't tell if it's problematic or not.

Still, problem is there's no such element as singlemail(0) at that point in your script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top