Ho fatto come hai detto tu ....
Mi genera questo errore:
Codice PHP:
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/newsletter/mail.asp, line 210
Questo è come ho sostituito il codice nella pagina:
Codice PHP:
'Send email (CDOSYS version).
if mailComp = "CDOSYS" then
arrayemail = split(strEmail, ",")
indice = 0
max = UBOUND(arrayemail)
WHILE NOT i> MAX
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.From = fromAddr
cdoMessage.To = arrayemail(i)
cdoMessage.Subject = subject
If Request.Form("version") = "html" Then
cdoMessage.HtmlBody = strEmailMsg
Else
cdoMessage.TextBody = strEmailMsg
End If
on error resume next
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
end if
set cdoMessage = Nothing
set cdoConfig = Nothing
i = i + 1
WEND
Codice PHP:
If Err.Number <> 0 then
Response.Write SendMail
Else
Response.Write "<div align=""center"">
" & _
"<span style=""font-family:arial;font-size:12px;color:#000080;font-weight:bold;text-align:left"">" & _
"Success! Newsletter sent</span></div>"
End If
End If
If Request.Form("purge") = "yes" Then
Set rsNews = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM newsLetter WHERE confirm = 'no';"
rsNews.Open strSQL, objConn, adOpenForwardOnly, adLockOptimistic, adCmdText
If Not rsNews.EOF Then
Do While Not rsNews.EOF
If DateDiff("y",rsNews("Date"),Now) > 7 then
rsNews.delete
End If
rsNews.MoveNext
Loop
End If
rsNews.Close
Set rsNews = Nothing
End If
objConn.Close
Set objConn = Nothing (Questa è la riga 210, dopo %> si chiuede </body> </html> )
%>