sono cosciente che non si fa ma sono disperato
in un post precedente ho discusso con
yro per lo script che sto per inserire ( devo ammettere che e' stato gentile e molto paziente) ciao nonostante non si e' risolto nulla
i "TECNICI DI ARUBA" continuano a scrivere di usare la mailing delle E-mail
solo che io vorrei che gli utenti si iscrivano da soli e non essere io ad inserire i loro indirizzi.....
a fronte di cio avevo rispolverato un vecchio script in .ASP e tutto contento l'ho inserito
ho testato l'iscrizione =ok
ho testato le interfacce =ok
il problema e' sorto quando ho provato ad inviare le e-mail
continua a dare gli errori
eServer object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /newsletter/admin/Gestione_Newsletter.asp, line 56 800401f3 ( con firefox)
yro gentilmente mi ha modificato il codice cdonts.... ma nullaServer object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /newsletter/admin/Gestione_Newsletter.asp, line 56 800401f3 ( con IE)
provo ad inserire qui il codice..sperando in un'anima pia
<%
' CONTROLLA SE SI E' IDENTIFICATI
IF session("amministratore")<>true then
Response.Redirect "index.asp"
End IF
%>
<html>
<head>
<title>GESTIONE NEWSLETTER</title>
</head>
<body>
<font size="4" face="Verdana">> Invia newsletter!</font></p>
<%
' LEGGE QUELLO CHE DEVE FARE
operazione = Request.QueryString("tipo")
' PERCORSO DEL DATABASE
url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("/mdb-database/database.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Open url_DB
' OPERAZIONE = INVIA IL MESSAGGIO DI NEWSLETTER
IF operazione = "invia" then
' VERIFICA CHE I CAMPI SIANO STATI COMPILATI
IF Request("oggetto") <> "" and Request("testo") <> "" then
' APRE LA CONNESSIONE AL DATABASE E PRELEVA LE EMAIL DELLA NEWSLETTER
Set RecSet = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM Email_Newsletter"
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
IF not RecSet.Eof then
' INDIRIZZO EMAIL NOSTRO
mittente = "info@acsgoldenteam.com"
Do until Recset.eof
' PRELEVA L'EMAIL DELL'UTENTE DAL NOSTRO DATABASE
destinatario = RecSet("email")
' PRELEVA IL TESTO DEL MESSAGGIO DA INVIARE
testo = Request.Form("testo")
' PRELEVA L'OGGETTO DEL MESSAGGIO DA INVIARE
oggetto = Request.Form("oggetto")
Dim MiaMail
Set MiaMail = Server.CreateObject("CDO.Message")
MiaMail.From = strEmailda
MiaMail.To = strEmaila
MiaMail.Cc = ""
MiaMail.Bcc = ""
MiaMail.Subject = (strTitolo)
MiaMail.HTMLBody = strBody
MiaMail.Fields("urn:schemas:httpmail:importance"). Value = 2
MiaMail.Fields.Update()
MiaMail.Send()
Set MiaMail = Nothing
' PASSA AVANTI...
RecSet.Movenext
loop
End If
RecSet.Close
Conn.close
Set RecSet = Nothing
Set Conn = Nothing
' VISUALIZZA UN MESSAGGIO DI CONFERMA:
%>
<hr>
<p align="center"><font face="Verdana" size="4">Messaggio inviati
correttamente!</font></p>
<hr>
<%
Else
%>
<hr>
<p align="center"><font face="Verdana" size="4">Compila tutti i campi!</font></p>
<hr>
<%
End IF
Else
%>
<form method="POST" action="Gestione_Newsletter.asp?tipo=invia">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="26%"><font face="Verdana" size="2">Oggetto messaggio:</font></td>
<td width="74%"><font face="Verdana" size="2"><input type="text" name="oggetto" size="20"></font></td>
</tr>
<tr>
<td width="26%"><font face="Verdana" size="2">Testo messaggio:</font></td>
<td width="74%"><font face="Verdana" size="2"><textarea rows="6" name="testo" cols="67"></textarea></font></td>
</tr>
<tr>
<td width="26%"><font face="Verdana" size="2">Formato e-mail:</font></td>
<td width="74%"><select size="1" name="formato">
<option selected value="1">Testo</option>
<option value="0">HTML</option>
</select></td>
</tr>
<tr>
<td width="26%"><font face="Verdana" size="2">Numero iscritti:</font></td>
<%
' CONTA GLI ISCRITTI ALLA NEWSLETTER
Set RecSet = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT Count(*) FROM Email_Newsletter"
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
' CONTA GLI ISCRITTI
IF not RecSet.Eof then
Iscritti = RecSet(0)
Else
Iscritti = 0
End if
%>
<td width="74%"><font face="Verdana" size="2"><%=Iscritti%></font></td>
<%
RecSet.Close
%>
</tr>
<tr>
<td width="100%" colspan="2"><input type="submit" value="Invia Newsletter!" name="B1"><input type="reset" value="Reimposta" name="B2"></td>
</tr>
</table>
</form>
</p>
<%
End IF
Conn.Close
Set Conn = Nothing
Set RecSet = Nothing
%>
</body>
</html>
p.s.questa riga " Set MiaMail = Server.CreateObject("CDO.Message")" e' stata provata pure "Set MiaMail = Server.CreateObject("CDOSYS.Message")

Rispondi quotando