al posto del codice:
codice:
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 = strEmail
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
metti il codice:
codice:
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