Visualizzazione dei risultati da 1 a 3 su 3

Discussione: luke_email - error

  1. #1

    luke_email - error

    Come mai da questo errore?
    codice:
    Microsoft JScript runtime error '800a01ad' 
    
    Automation server can't create object 
    
    /luke_email/email.asp, line 37

    Grazie a tutti

    codice:
    <%@LANGUAGE = JScript%>
    <%
       /*
            Autore: Luca Ruggiero - http://www.lukeonweb.net
            Fonte:  freeAsp.it - http://freeasp.html.it
       */
    
       var destinatario = "tua@email.ext"; // Inserisci qui il tuo indirizzo email
    
       // Recupero i dati dal modulo
       var nome = new String(Request.Form("nome"));
       var cognome = new String(Request.Form("cognome"));
       var email = new String(Request.Form("email"));
       var oggetto = new String(Request.Form("oggetto"));
       var importanza = new String(Request.Form("importanza"));
       var messaggio = new String(Request.Form("messaggio"));
       var html = new String(Request.Form("html"));
    
       // RegExp per l'email
       var valida = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
    
       // Imposto la data
       var oggi = new Date();
       var data = oggi.getDate() + "/" + (oggi.getMonth() + 1) + "/" + oggi.getYear() + " alle ore " + oggi.getHours() + ":" + oggi.getMinutes();
    
       // Imposto l'indirizzo IP del mittente
       var ip = Request.ServerVariables("REMOTE_ADDR");
    
       // Controllo la validità dei campi
       if ((nome == "") || (nome == "undefined")) Response.Redirect("errore.htm?id=1");
       if ((cognome == "") || (cognome == "undefined")) Response.Redirect("errore.htm?id=2");
       if (!valida.test(email)) Response.Redirect("errore.htm?id=3");
       if ((oggetto == "") || (oggetto == "undefined")) Response.Redirect("errore.htm?id=4");
       if ((messaggio == "") || (messaggio == "undefined")) Response.Redirect("errore.htm?id=5");
    
       // Creo la classe CDONTS.NewMail ed invio l'email
       var OggettoCDONTS = new ActiveXObject("CDONTS.NewMail");
           OggettoCDONTS.Importance = importanza;
           OggettoCDONTS.From = email;
           OggettoCDONTS.To = destinatario;
           OggettoCDONTS.Subject = oggetto;
           // Verifica se la mail è in formato Html
           if ((html == "") || (html == "undefined")) {
               OggettoCDONTS.BodyFormat = 1;
               OggettoCDONTS.MailFormat = 1;
               OggettoCDONTS.Body = "Dati del mittente\n\nNome: " + nome + "\nCognome: " + cognome + "\nEmail: " + email + "\nIP: " + ip + "\n\nMessaggio spedito il " + data + "\n\nQuesto è il corpo del messaggio:\n\n" + messaggio;
           }
           else {
               OggettoCDONTS.BodyFormat = 0;
               OggettoCDONTS.MailFormat = 0;
               OggettoCDONTS.Body = "Dati del mittente
    
    Nome: " + nome + "
    Cognome: " + cognome + "
    Email: " + email + "
    IP: " + ip + "
    
    Messaggio spedito il " + data + "
    
    Questo è il corpo del messaggio:
    
    " + messaggio;
           }
           OggettoCDONTS.Send();
    
       // Reindirizzo il mittente verso la pagina di conferma
       Response.Redirect("conferma.htm");
    %>
    La Gratitudine è la prima cosa nella vita...

    Grazie a tutti

  2. #2
    La linea 37 è questa?

    codice:
    var OggettoCDONTS = new ActiveXObject("CDONTS.NewMail");
    Potrebbe pure essere (molto probabile), che il tuo hosting non supporti il componente CDONTS.

    Eventualmente informati contattandoli.
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  3. #3
    uso aruba...
    La Gratitudine è la prima cosa nella vita...

    Grazie a tutti

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.