Visualizzazione dei risultati da 1 a 6 su 6

Discussione: NEWS LETTER

  1. #1

    NEWS LETTER

    Salve ragazzi, mi sapreste aiutare

    cercavo uno script in ASP per l'invio di News Letter ma che utilizzi il sistema d'invio CDOSYS.

    grazie

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Trova uno script di newsletter. Se non usa CDONTS puoi sempre modificare lo script per adattarlo a questo componente.

    Roby

  3. #3
    ma a me serve con CDOSYS......uno script come dici tu be c'è l'ho sotto mano!!

    pensavo di trovare qualcosa pronto per non complicarmi la vita ho già troppi capelli bianchi!!


  4. #4
    allora ho fatto delle modifiche mi aiutate sono giuste a me non funziona appena klicco "send" mi da impossibile visualizzare la pagina

    codice:
    <%@ LANGUAGE="VBScript" %>
    <%Option Explicit%>
    <html>
    <head>
    	
    </head>
    <body>
    
    <%
    Dim con, rs, strSql, objMail
    
    If Request.Form("cmdSubmit") <> "" Then
    	'The user has submitted the page, so process the Newsletter subscription request
    	
    	'Connect to the database
    	Set con = GetDBConnection()
    		
    	'Get all email addresses in the database
    	strSql = "SELECT Email FROM Subscribers"
    	Set rs = Server.CreateObject("ADODB.Recordset")
    	rs.Open strSql, con, 1, 2
    	
    	If rs.EOF Then
    
    'MODIFY the text below displays when no subscribers exist
    %>
    		There are no subscribers to the newsletter.
    <%
    		'Clean up database objects
    		rs.Close()
    		Set rs = Nothing
    		con.Close()
    		Set con = Nothing
    	
    		Response.End		
    	End If
    
    	While Not(rs.EOF)
    		Set objMessage = CreateObject("CDO.Message")
    
    'MODIFY the following email address will appear as the from address for the email.
    		objMessage.Sender = "redazione@stadioradio.it"
    		objMessage.To = rs("Email")
    		objMessage.TextBody = Request.Form("txtEmail")
    		
    		objMessage.Send
    			
    		rs.MoveNext()
    	Wend
    
    'MODIFY the text below displays when all the emails have been sent
    %>
    	The emails have been sent.
    <%
    
    	'Clean up database objects
    	rs.Close()
    	Set rs = Nothing
    	con.Close()
    	Set con = Nothing
    
    Else
    	
    'MODIFY the text below is displayed when the page is first loaded.
    %>
    	<form action="send.asp" method="post" id=form1 name=form1>
    		<div align="center">
    			Enter the email message to send:
    
    			<textarea name="txtEmail" cols="50" rows="30"></textarea>
    
    			<input type="submit" name="cmdSubmit" value="Submit">
    		</div>
    	</form>
    <%
    End If
    %>
    
    </body>
    </html>

    forse il problema è qui:

    codice:
    rs.Open strSql, con, 1, 2
    questa riga che fa?

  5. #5
    questa riga apre in recordset e la connessione al database sql
    Perché la guerra non può essere evitata, ma solo rinviata a vantaggio degli altri... (N. Machiavelli)

  6. #6
    SI MA PERCHè MI DA IMPOSSIBILE APRIRE LA PAGINA HO SBAGLIATO LE MODIFICHE PER CDOSYS?


Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.