Visualizzazione dei risultati da 1 a 2 su 2

Discussione: modifica a newsletter

  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    62

    modifica a newsletter

    Buongiorno a tutti!

    Ho un problema con il codice di una newsletter, spero che possiate aiutarmi. La suddetta newsletter (di cui riporto il codice in basso) è editabile tramite una consolle, ma è stata creata per l'immissione di semplice testo. Ora invece mi servirebbe poter inserire al suo interno anche delle immagini. Non avendo sufficienti conoscenze di Asp, vi chiederei se possibile di modificarmi il codice affinchè funzioni in tal senso.
    Nel caso l'operazione richieda troppo tempo, spero almeno possiate darmi dei consigli o delle indicazioni utili a raggiungere il mio scopo.
    Vi ringrazio anticipatamente!! :-)


    Mauro



    Codice della newsletter:


    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 newsletter"
    	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 objMail = Server.CreateObject("CDONTS.NewMail")
    
    'MODIFY the following email address will appear as the from address for the email.
    		objMail.From = "newsletter@yoursite.com"
    		objMail.To = rs("Email")
    		objMail.HTMLBody = Request.Form("txtEmail")
    		
    		objMail.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">
    			
    
    		  Messaggio della newsletter:
    
    		  
    
    			<textarea name="txtEmail" cols="70" rows="20"></textarea>
    			
    
    			<input type="submit" name="cmdSubmit" value="Spedisci">
    	  </div>
    	</form>
    <%
    End If
    %>
    
    </body>
    </html>
     :)  :)

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    62
    Almeno un aiutino...sigh!

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 © 2026 vBulletin Solutions, Inc. All rights reserved.