An array cannot be bound to SMTPmail MassMail method, but an empty recordset can be used instead. On the page that instantiates SMTPmail, create an empty recordset and add values as you would with an array. You will need to reference the adovbs.inc file in an include statement or reference the TypeLibrary in order to use enumerators such as "adVarChar". Bind this recordset to the MassMail method in the usual way.
<!--METADATA TYPE="TypeLib"
NAME="Microsoft ActiveX Data Objects 2.6 Library" UUID="{00000206-0000-0010-8000-00AA006D2EA4}" VERSION="2.6" -->
...
'---Create an empty recordset
set objRec = Server.CreateObject("ADODB.RecordSet")
'---Define the fields
objRec.Fields.Append "FullName", adVarChar, 200
objRec.Fields.Append "Email", adVarChar, 200
'---Open it so that you can begin populating it.
objRec.Open
'---repeat the following 4 lines as necessary
'---in order to fill the recordset
objRec.AddNew
objRec("FullName") = "John Smith"
objRec("Email") = "account@domain.com"
objRec.Update
'---When the recordset is fully populated, continue with SMTPmail.
Set mailer = Server.CreateObject("SoftArtisans.SMTPMail")
mailer.MassMail (objRec)
objRec.close
set objRec = Nothing
set mailer = Nothing
|