Salve a tutti, sono qui per chiedere il vostro aiuto!
Utilizzo uno script per l'invio di newsletter.
Il server è su aruba, e fino a poco tempo fa nessun problema, adesso lo script esegue correttamente l'invio (nessun errore di programmazione) ma le email non arrivano a destinazione.
Posto il codice
codice:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Type Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
<!--n.b.: non Ë necessario includere il file adovbs.inc dopo avere invocato la ADODB library-->
<!-- #INCLUDE file="store.asp" -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="box">
<tr height="87">
<td align="left" valign="top" class="box-main" height="87">
<%
'Invio messaggi con CDOSYS
strFrom = Request.Form("From")
strSubject = Request.Form("titolo")
strBody = Request.Form("messaggi")
Set objRec = Server.CreateObject ("ADODB.Recordset")
'apertura database
objRec.Open "mailing_List", objConn, adOpenKeyset, _
adLockReadOnly, adCmdTable
Response.Write("<center><h3>Invio messaggi in corso</h3></center>")
'scorro gli indirizzi
While Not objRec.EOF
invioA = objRec("email")
invioDa = "info@investimmobiliare.it" 'indirizzo email del mittente
'* creo gli oggetti cdosys sul server e li gestisco
Dim Mail
sch = "http://schemas.microsoft.com/cdo/configuration/"
set Mail = server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iConf.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "localhost"
.update
End With
With Mail
Set.Configuration = iConf
.To = invioA
.From = invioDa
.Sender = invioDa
.Subject = strsubject
.TEXTBody = "Testo del messaggio: " & vbCrLf & strbody & ""
.Fields("urn:schemas:httpmail:importance").Value = 2
.Send
end With
set Mail=nothing
set iConf=nothing
'conferma invio
Response.Write "Messaggio inviato a " & objRec("EMail") & "!<br>"
'prossimo record
objRec.MoveNext
WEND
objRec.close
set objRec = nothing
objConn.close
set objConn = nothing
Response.Write("<center><h3>Messaggi inviati!</h3><center><br><a title='Torna all'home page' href='add_mailing.asp'>torna alla home page</a>")
%></td>
</tr>
</table>
Qualche consiglio?
Grazie