Newsletter con comando cdosys???

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
buongiorno a tutti
dopo aver caricato uno script per newsletter
che permetteva di registrare la propria e-mail ( tramite DB)
e sempre da sito permetteva di inviare una mail agli iscritti

scopro che il mio e' un vecchio script...con il comando cdonts comando che non e' piu' supportato dai server ma e' stato sostituito con il cdosys

ora considerando che di asp non ci capisoc una mazza
esiste qualcuno che sa indicarmi dove posso scvaricare uno script completo????

grazie a tutti
 

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
chiedo umilmente perdono ma non ci sto capendo una mazza
vi allego il file compleot che vorrei far funzionare ma pure settandolo ricevo quesot errore

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'Response.Cookies(...).Expires'

/test/newsletter/admin/checklogin.asp, line 20

HELPPPPPPPPPPP
 

Allegati

  • asp_eznewsletter.zip
    28,4 KB · Visite: 244

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
domanda inutile :
ma che cavolo di pconnessione deov inserire????

<%@LANGUAGE = VBScript%>
<%
' Recupero tutte le variabili per l'applicazione
Dim messaggio, pag, cn, rs, quante, tot, i, email

' Recupero il corpo della mail
messaggio = "Corpo della mail da recuperare da un form..."

' Recupero e controllo il numero di pagina corrente
pag = Request.QueryString("pag")
If IsNumeric(pag) = False Or pag < 1 Then pag = 1

' Memorizzo il messaggio in una sessione per disporne
If messaggio <> "" Then
Session("messaggio") = messaggio
Else
Response.End
End If

' Mi connetto al database
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
cn.Open ' QUI LA STRINGA DI CONNESSIONE

' Lancio la query
rs.Open "SELECT email FROM newsletter", cn, 1

' Predispongo la paginazione
quante = 50
rs.CacheSize = quante
rs.PageSize = quante
rs.AbsolutePage = pag
tot = CInt(rs.PageCount)
i = 0

' Invio le mail una alla volta a blocchi da 50
Do While Not rs.EOF
Set email = Server.CreateObject("CDO.Message")
email.From = "[email protected]"
email.To = rs("email")
email.Subject = "Newsletter del " & Date()
email.TextBody = Session("messaggio")
email.Send
Set email = Nothing
i = i + 1
If i = quante Then Exit Do
rs.MoveNext
Loop

' Un po di pulizia
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing

' Mi sposto al blocco della pagina successiva
If CInt(pag) < CInt(tot) Then
Response.redirect "newsletter.asp?pag=" & CInt(pag) + 1
End If

' Monitorizzo il numero di pagina corrente
Response.write ("Pagina corrente: " & pag)
%>
 

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
NOVITA'

si risolve una cosa e.....
adesos mi spunta

> Invia newsletter!

Microsoft VBScript runtime error '800a01a8'

Object required: 'email'

/nuova/newsletter/admin/Gestione_Newsletter.asp, line 79

azzo vuoldire?
 

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
<%
' CONTROLLA SE SI E' IDENTIFICATI
IF session("amministratore")<>true then
Response.Redirect "index.asp"
End IF
%>
<html>

<head>
<title>GESTIONE NEWSLETTER</title>
</head>

<body><p><b><font size="4" face="Verdana">&gt; Invia newsletter!</font></b></p>

<!-- #INCLUDE FILE="../adovbs.inc" -->
<%
' 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 = "[email protected]"

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")

' INVIA IL MESSAGGIO
Set myMail=CreateObject("CDO.Message")
myMail.Subject=oggetto
myMail.From=mittente
myMail.To=destinatario
if Request.Form("formato")=1 then
myMail.TextBody=testo
else
myMail.HtmlBody=testo
end if
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.miosito.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing

' FORMATO EMAIL
email.BodyFormat = Request.Form("formato")
email.MailFormat = Request.Form("formato")


email.Body = testo

' INVIA L'EMAIL E..
email.Send

Set email = 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"><b>Messaggio inviati
correttamente!</b></font></p>
<hr>
<%
Else
%>
<hr>
<p align="center"><font face="Verdana" size="4"><b>Compila tutti i campi!</b></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%"><b><font face="Verdana" size="2"><%=Iscritti%></font></b></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>&nbsp;</p>
<%
End IF
Conn.Close
Set Conn = Nothing
Set RecSet = Nothing
%>
</body>

</html>
 

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
dovrebbere essere questa

email.BodyFormat = Request.Form("formato")

togliendola porta l'errore alal riga 80

' FORMATO EMAIL
email.BodyFormat = Request.Form("formato")
email.MailFormat = Request.Form("formato")


email.Body = testo
 
Ultima modifica:

Luis_Cypher

Nuovo Utente
22 Set 2008
8
0
0
mah..boh....
mi fai una cortesia... li elimini tu e reinserisci lo script?
prometot che dopo mi rimetot a studiare:fonzie::fonzie:
 
Discussioni simili
Autore Titolo Forum Risposte Data
I Errore 80040220 nella newsletter con paginazione Classic ASP 0
Z Limite invio newsletter con PHP - mail() PHP 4
Gabriele Visioli Utilizzo Newsletter con E-mail Leggi, Normative e Fisco 0
B newsletter con html HTML e CSS 3
Z Inviare newsletter da sito realizzato con WordPress Email Marketing 6
A Newsletter con statistiche Classic ASP 1
L problema invio newsletter con script proprio in php PHP 10
PenguinLover Inviare newsletter con Magento Magento 1
B Comperiamo spazi su dem o newsletter con iscritti italiani Vendere e Acquistare pubblicita' online 0
T Ho un problema con una newsletter PHP 1
K newsletter con flash Flash 9
K newsletter con allegato e html Classic ASP 5
SolidSnake4 newsletter con php PHP 0
G Newsletter e myCred Email Marketing 0
C Mailchimp ritardo invio newsletter subscribers Email Marketing 1
Ayoub Lefhim [Vendo] HIGH QUALITY Guest Post - Banner - Newsletter! PR 3 Vendere e Acquistare pubblicita' online 2
A newsletter sia in html che in php PHP 33
C [WordPress] Newsletter e ContactLab WordPress 4
A Implementare newsletter PHP 5
H Cookie Law e Newsletter Email Marketing 1
L testo per la privacy "newsletter" HTML e CSS 21
I Newsletter ? HTML e CSS 3
V Newsletter professionali Email Marketing 0
F Newsletter HTML e CSS 1
S Problemi form registrazione newsletter PHP 0
M info newsletter Email Marketing 1
F newsletter Email Marketing 1
L Script newsletter creato da me. Mi date consigli? PHP 23
L crontab e newsletter in php PHP 1
L consigli per inviare newsletter PHP 8
Mauro Guardiani errore newsletter mysql MySQL 1
M script per invio newsletter Classic ASP 4
D 60.000 spot html DEM newsletter a 60 euro Vendere e Acquistare pubblicita' online 0
G messaggio di errore iscrizione newsletter ASP.NET 2
I [Vendo] da 5.000 a 60.000 newsletter DEM o 1000 clicks a 0.045 Vendere e Acquistare pubblicita' online 0
D flash e php per creare newsletter Flash 3
D Newsletter in php PHP 4
N [Vendo] Invio 60.000 Newsletter DEM Vendere e Acquistare pubblicita' online 0
helpdesk Invio Newsletter PHP 4
B script newsletter in italiano PHP 3
U Nuovo servizio Invio Newsletter Presenta il tuo Sito 0
A invio newsletter a 50 indirizzi per volta Classic ASP 16
D risultati invio di newsletter PHP 6
S Pubblicità Newsletter Vendere e Acquistare pubblicita' online 0
L Consigli per una Newsletter HTML e CSS 3
A Aiuto newsletter PHP 13
L script per invio newsletter PHP 1
E php simply newsletter PHP 0
borgo italia ancora newsletter+phpmailler PHP 3
lmweb.it Realizzazione Newsletter PHP 1

Discussioni simili