It doesn't matter if the data is in a string or hardcoded. If you specify the list in "To" field, then it will send mail to multiple receipients. Please check the following example:
<%
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
str = "
[email protected];
[email protected]"
objNewMail.From = "
[email protected]"
objNewMail.To = str
objNewMail.Subject = "This is a test Mail"
objNewMail.Body = "This is the Body text of this test mail."
objNewMail.Send
Set objNewMail = Nothing
Response.Write "Email has been sent"
%>
The source of str variable can be anything.
you can send mail to 2 recepients using above code..
Om Prakash