Actually, classic ASP allows this by default. The only reason it doesn't work with the
Tell a Friend sample is because of the additional checking we do to make sure the email is valid
and to prevent abuse of the system. If you want to allow users to do this, you simply need to
revise the validation to allow it.
In the case of this sample, I'd probably just replace this line:
bValidInput = bValidInput And IsValidEmail(strToEmail)
with the following:
Dim arrToEmail, I
strToEmail = Replace(strToEmail, ", ", ",")
arrToEmail = Split(strToEmail, ",")
For I = LBound(arrToEmail) To UBound(arrToEmail)
bValidInput = bValidInput And IsValidEmail(arrToEmail(I))
Next
The first line removes spaces that follow commas. The second splits the list of email
addresses into an array of email addresses. The loop then runs through the array making sure each message
passes validation. If any of them fail, the script will display an error message. Otherwise the message
should be sent to the whole list of users.
This fix is nice because it follows the same pattern as the rest of the script and
is quite easy to implement. It also allows us to use the same validation routine
as we do for single email addresses which keeps things nice and simple.