Buongiorno a tutti,
ho un problema con il nuovo formato CDO: ho cambiato server (sono su 9Net) e il codice che utilizzava CDONTS per la gestione di una newsletter non funziona più. Ho provato a fare delle modifiche ma continuo ad avere errori.
Ecco il vecchio codice:
<%
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT Email FROM Mailing ORDER BY Email"
rs.Open strSQL,cn
tipo=request("Tipo")
email=request("Email")
mittente=request("Mittente")
oggetto=request("Oggetto")
if tipo="html" then
do while not rs.eof
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.From=mittente
objMail.To=rs("Email")
objMail.Subject=oggetto
objMail.Body=email
objMail.Send
Set objMail = nothing
rs.movenext
loop
else
do while not rs.eof
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 1
objMail.MailFormat = 1
objMail.From=mittente
objMail.To=rs("Email")
objMail.Subject=oggetto
objMail.Body=email
objMail.Send
Set objMail = nothing
rs.movenext
loop
end if
set cn = nothing
set rs = nothing
%>
Grazie per l'aiuto!
![]()

Rispondi quotando
