Devo inviare circa 1000 mail a blocchi di 50 mail ogni 15 minuti, altrimenti con aruba nn me le invia tutte, cosa devo inserire nello script che ho riportato sotto. Grazie
<%
Dim tipo, email, mittente, oggetto
Dim BCC, conta
tipo=request("Tipo")
email=request("Email")
mittente=request("Mittente")
oggetto=request("Oggetto")
Set cn = Server.CreateObject("ADODB.Connection")
%><%
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT Email FROM Mailing ORDER BY Email"
rs.Open strSQL,cn
If (rs.eof = true) AND (rs.bof = true) then
response.write "Non ho trovato nessun indirizzo"
else
rs.movefirst
Conta = 0
BCC = ""
do until rs.eof
do until (Conta > 30) OR (rs.eof = true)
BCC = BCC & rs("email") & "; "
Conta = Conta + 1
rs.movenext
loop
'#### CREO LA MAIL
Set Config = Server.CreateObject("CDO.Configuration")
Set Fields = Config.Fields
Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort
Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.verdifirenze.it"
Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
' ************************************ DA MODIFICARE
Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "info@verdifirenze.it"
' ************************************ DA MODIFICARE
Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mauro"
Fields.Update
Set objMail = Server.CreateObject("CDO.Message")
Set objMail.Configuration = Config
objMail.To = mittente
objMail.From = mittente
objMail.Bcc = BCC
objMail.Subject = oggetto
'*** Verifico il formato mail
if tipo="html" then
objMail.HTMLBody = email
else
objMail.TextBody = email
end if
objMail.Send
set objMail = Nothing
Set Fields = Nothing
Set Config = Nothing
Conta = 0
BCC = ""
loop
end if
set cn = nothing
set rs = nothing
%>