Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 14

Discussione: EMail come fare?

  1. #1

    EMail come fare?

    Ciao a tutti,

    Ho un problemino...
    Devo far si che, una volta che un utente si registra sul mio sito, in automatico, venga generata una mail di avviso per il cliente di avvenuta registrazione con allegato i dati che il cliente ha inserito nel percorso di registrazione...

    Ho provato con vari pezzi di codice, anche presi dalla rete, ma niente da fare...

    Qui sotto vi posto l'ultimo codice su cui sto lavorando, mi potete dare qualche dritta?

    codice:
    Response.Write("<center><h3>Invio messaggi in corso</h3></center>")
    
    invioA = "xx@xx.it"
    
    invioDa = "yy@yy.it"
    
    DIM iMsg, Flds, iConf
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    Flds("http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion") = True
    Flds(cdoSendUsingMethod) = cdoSendUsingPort
    Flds(cdoSMTPServer) = "smtp.aruba.it" 
    Flds(cdoSMTPServerPort) = 25
    Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
    Flds.Update
    With iMsg
    Set .Configuration = iConf
    .To = invioA
    .From = strfrom
    .Sender = invioDa
    .Subject = strsubject
    .textBody = "Testo del messaggio: " & vbCrLf & strbody & ""
    .Send
    End With
    Set iMsg = nothing
    Set iConf = nothing
    
    Response.Write("<center><h3>Messaggi inviati!</h3><center>") 
    %>
    :metallica
    Che cosa vuoi che ti dica???
    Senti che bel rumore...

  2. #2
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Errore?

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2005
    Messaggi
    89
    ciao io ho il tuo stesso problema cerco di provarlo in locale sembra che funziona ma poi non arriva nessuna mail...aiutiamoci..

  4. #4
    mi da questo errore:

    codice:
    ADODB.Fields error '800a0bb9'
    
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
    sulla righa:

    Flds(cdoSendUsingMethod) = cdoSendUsingPort

    non so che fare!?!?


    :metallica
    Che cosa vuoi che ti dica???
    Senti che bel rumore...

  5. #5
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Sei sicuro di essere su un winserver 2003?

    E se stai su aruba, questo č il codice corretto.

  6. #6
    il mio problema č che anche usando un server "free" non mi invia la mail ma neanche a pregare in aramaico antico...

    non so, sicuramente non vedo un errore sul codice o non ho settato bene qualcosa sul server...

    che dite?

    ps: x fly82: tu che codice usi? postalo cosi vediamo di fare un check insieme...
    :metallica
    Che cosa vuoi che ti dica???
    Senti che bel rumore...

  7. #7
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Verifica quale componente utilizza il tuo server per l'invio delle email con questo script (che si trova con la ricerca e si chiama comchecker):

    codice:
    <html>
    <head>
    <title>Check Components</title>
    </head>
    <body>
    <%
    
    	REM	Project:		COM Checker
    	REM	Creator:		James Lindėn
    	REM	Date:		6/25/2001 12:14am
    
     	'**************************************
    ***************************
    
    	'	COM Checker version 1.0
    	'	© 2001 Ticluse Teknologi, All rights reserved.
    
    	'	This class may be redistributed, as long as copyright and development
    	'	information remain intact with class source code. Bug reports and / or
    	'	comments may be directed to jlinden@intelidev.com.
    
     	'**************************************
    ***************************
    
    	Dim comList(43)
    		comList(0) = Array( "AB Mailer","ABMailer.Mailman" )
    		comList(1) = Array( "ABC Upload","ABCUpload4.XForm" )
    		comList(2) = Array( "ActiveFile","ActiveFile.Post" )
    		comList(3) = Array( "ActiveX Data Object","ADODB.Connection" )
    		comList(4) = Array( "Adiscon SimpleMail","ADISCON.SimpleMail.1" )
    		comList(5) = Array( "ASP HTTP","AspHTTP.Conn" )
    		comList(6) = Array( "ASP Image","AspImage.Image" )
    		comList(7) = Array( "ASP Mail","SMTPsvg.Mailer" )
    		comList(8) = Array( "ASP Simple Upload","ASPSimpleUpload.Upload" )
    		comList(9) = Array( "ASP Smart Cache","aspSmartCache.SmartCache" )
    		comList(10) = Array( "ASP Smart Mail","aspSmartMail.SmartMail" )
    		comList(11) = Array( "ASP Smart Upload","aspSmartUpload.SmartUpload" )
    		comList(12) = Array( "ASP Tear","SOFTWING.ASPtear" )
    		comList(13) = Array( "ASP Thumbnailer","ASPThumbnailer.Thumbnail" )
    		comList(14) = Array( "ASP WhoIs","WhoIs2.WhoIs" )
    		comList(15) = Array( "ASPSoft NT Object","ASPSoft.NT" )
    		comList(16) = Array( "ASPSoft Upload","ASPSoft.Upload" )
    		comList(17) = Array( "CDONTS","CDONTS.NewMail" )
    		comList(18) = Array( "Chestysoft Image","csImageFile.Manage" )
    		comList(19) = Array( "Chestysoft Upload","csASPUpload.Process" )
    		comList(20) = Array( "Dimac JMail","JMail.Message" )
    		comList(21) = Array( "Distinct SMTP","DistinctServerSmtp.SmtpCtrl" )
    		comList(22) = Array( "Dundas Mailer","Dundas.Mailer" )
    		comList(23) = Array( "Dundas Upload","Dundas.Upload.2" )
    		comList(24) = Array( "Dynu Encrypt","Dynu.Encrypt" )
    		comList(25) = Array( "Dynu HTTP","Dynu.HTTP" )
    		comList(26) = Array( "Dynu Mail","Dynu.Email" )
    		comList(27) = Array( "Dynu Upload","Dynu.Upload" )
    		comList(28) = Array( "Dynu WhoIs","Dynu.Whois" )
    		comList(29) = Array( "Easy Mail","EasyMail.SMTP.5" )
    		comList(30) = Array( "File System Object","Scripting.FileSystemObject" )
    		comList(31) = Array( "Ticluse Teknologi HTTP","InteliSource.Online" )
    		comList(32) = Array( "Last Mod","LastMod.FileObj" )
    		comList(33) = Array( "Microsoft XML Engine","Microsoft.XMLDOM" )
    		comList(34) = Array( "Persits ASP JPEG","Persits.Jpeg" )
    		comList(35) = Array( "Persits ASPEmail","Persits.MailSender" )
    		comList(36) = Array( "Persits ASPEncrypt","Persits.CryptoManager" )
    		comList(37) = Array( "Persits File Upload","Persits.Upload.1" )
    		comList(38) = Array( "SMTP Mailer","SmtpMail.SmtpMail.1" )
    		comList(39) = Array( "Soft Artisans File Upload","SoftArtisans.FileUp" )
    		comList(40) = Array( "Image Size", "ImgSize.Check" )
    		comList(41) = Array( "Microsoft XML HTTP", "Microsoft.XMLHTTP" )
    		comList(42) = Array( "Grafici Excel", "OWC.Chart" )
    		comList(43) = Array( "ADODB Stream", "ADODB.Stream" )
    
    	'This function was modified from the work of Rob Risner.
    	'http://www.planetsourcecode.com/xq/ASP/txtCodeId.6731/lngWId.4/qx/vb/scripts/ShowCode.htm
    
    	Function IsAvailable( comIdentity )
    		On Error Resume Next
    		IsAvailable = False
    		Err = 0
    		Set xTestObj = Server.CreateObject( comIdentity )
    		If Err = 0 Then IsAvailable = True
    		Set xTestObj = Nothing
    		Err = 0
    	End Function
    
    	Public Function CheckCOM()
    		Avail = 0
    		strTxt = "<table cellpadding=3 cellspacing=3 border=0 align=center width=300>" & vbNewLine
    		For Idx = LBound( comList ) To UBound( comList )
    			Provider = Idx
    			strTxt = strTxt & vbTab & "<tr><td width=200><font class=norm>" & comList(Idx)(0) & "</font></td>"
    			strTxt = strTxt & "<td align=right width=20><font class=norm>[</font></td>"
    			If IsAvailable( comList(Idx)(1) ) Then
    				strTxt = strTxt & "<td align=center><font face=tahoma size=2 color=blue>Available</font></td>"
    				Avail = Avail + 1
    			Else
    				strTxt = strTxt & "<td align=center><font class=norm>Unavailable</font></td>"
    			End If
    			strTxt = strTxt & "<td align=left width=20><font class=norm>]</font></td></tr>" & vbNewLine
    		Next
    		strTxt = strTxt & vbTab & "<tr><td colspan=4 height=30><font class=norm><font color=blue>" & Avail & "</font> of "
    		strTxt = strTxt & UBound( comList ) + 1 & " supported components are available.</font></td></tr>" & vbNewLine
    		CheckCOM = strTxt & "</table>" & vbNewLine
    	End Function
    
    	Response.Write( CheckCOM() )
    %>
    
    <p align=center>
    	<font class=arial size=2><a href=http://www.intelidev.com/goto.asp?comchecker>COMChecker</a> version 1.1 - by James Lindėn
    © 2001 Ticluse Teknologi, All rights reserved.</font>
    </p>
    </body>
    </html>
    Dopodichč stabilito quale componente devi utilizzare ti sarą risposto di conseguenza.

    Ciao

  8. #8
    Utente di HTML.it
    Registrato dal
    Sep 2005
    Messaggi
    89
    io ho scoperto che il provider ha win 2000 quindi devo usare cdonts,ma come posso prendere anche altri dati dalla form?aggiungendo delle righe su questo codice?vi posto sia la versione originale che quella modificata da me per prendere altri dati...

    <%
    // Recupero i dati dal modulo
    var nome = new String(Request.Form("nome"));
    var email = new String(Request.Form("email"));
    var messaggio = new String(Request.Form("messaggio"));


    // Effettuo un banale controllo sulla validitą dei campi
    if (nome == "" || email == "" || messaggio == "") {
    Response.Write("ERRORE: Tutti i cami sono obbligatori");
    Response.End;
    }

    // Creo l'oggetto (o classe) CDONTS.NewMail
    var OggettoCDONTS = new ActiveXObject("CDONTS.NewMail");
    OggettoCDONTS.From = email; // Mittente
    OggettoCDONTS.To = "lucaruggiero@email.it";
    // Destinatario (inserisci la tua email)
    OggettoCDONTS.Subject = "Messaggio da " + nome;
    // Oggetto
    OggettoCDONTS.Body = messaggio; // Corpo
    OggettoCDONTS.Send(); // Invio la mail

    Response.Write("Email inviata con successo!");
    %>

    quella modificata da me č questa:

    <%
    // Recupero i dati dal modulo
    var nome = new String(Request.Form("nome"));
    var email = new String(Request.Form("email"));
    var cognome = new String(Request.Form("cognome"));
    var telefono = new String(Request.Form("telefono"));
    var cap = new String(Request.Form("cap"));
    var indirizzo = new String(Request.Form("indirizzo"));
    var citta = new String(Request.Form("citta"));
    var nazionalita = new String(Request.Form("nazionalita"));
    var club = new String(Request.Form("club"));
    var card = new String(Request.Form("card"));
    var identita = new String(Request.Form("identita"));
    var numero_identita = new String(Request.Form("numero_identita"));
    var scadenza = new String(Request.Form("scadenza"));
    var cellulare = new String(Request.Form("cellulare"));
    var card_richiesta = new String(Request.Form("card_richiesta"));


    // Effettuo un banale controllo sulla validitą dei campi
    if (nome == "" || email == "" || cognome == "" || cellulare == "") {
    Response.Write("ERRORE: Tutti i campi sono obbligatori");
    Response.End;
    }

    // Creo l'oggetto (o classe) CDONTS.NewMail
    var OggettoCDONTS = new ActiveXObject("CDONTS.NewMail");
    OggettoCDONTS.From = email; // Mittente
    OggettoCDONTS.To = "info@miodominioovviamente.it";

    OggettoCDONTS.Subject = "Iscrizione" + nome;

    OggettoCDONTS.Body = messaggio;
    OggettoCDONTS.Send();

    Response.Write("Email inviata con successo!");
    %>

    mi da errore sul request nome

  9. #9
    allora mi dice che č Cdonts č attivo perņ il server č win 2003
    come faccio ad installare cdosys??
    :metallica
    Che cosa vuoi che ti dica???
    Senti che bel rumore...

  10. #10
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Originariamente inviato da Lan
    allora mi dice che č Cdonts č attivo perņ il server č win 2003
    come faccio ad installare cdosys??
    se hai CDONTS utilizza CDONTS

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.