Visualizzazione risultati 1 fino 10 di 10

Discussione: invia e-mail

  1. #1
    Guest

    Predefinito invia e-mail

    sto cercando un codice mail per inserirlo in un sito web!, ho provato più di un codice e mi pare che funzionano e mi ristituiscono correttamente la pagine di ringraziamente ma non invia e-mail, non sono assolutamente a conoscenza del php,
    Grazie
    Ultima modifica di belfar : 10-10-2007 alle ore 07.42.56

  2. #2
    Guest

    Predefinito

    Hai già provato a fare qualche ricerca sul forum, come da regolamento?


    ciao!

  3. #3
    Guest

    Predefinito

    si, ho fatto qualche ricerca, ho trovato tanti argomenti intressanti ma non rispondo alla mia esigenza, e probabile anche che ci siano!,
    ho creato uno dei codici con un programma, e nel manuale del programma indicato nei "problemi frequenti": se l'invio del messaggio non vada in buon fine perche probabile che il server non permette l'invio del messaggio (bisogna contattare il hosta, quindi ho scaricato altri codici ma si ripeta lo stesso problema, quindi non so cosa fare, se lei sa indicarmi una discussione che forniscono questi dati, ne sarei contento felice
    chiedo scusa per miei sbagli grammaticali
    ciao, a presto

  4. #4
    L'avatar di seneca
    seneca non è connesso Super Moderatore
    Data registrazione
    18-12-2004
    Residenza
    la Città Eterna
    Messaggi
    8,376

    Predefinito

    Eccoti una discussione con un codice corretto per creare un form per le mail dal sito.
    Ma si sorge il dubbio, leggendo il tuo messaggio, che tu possa sbagliare a scrivere l'indirizzo mail (controlla anche tra lo spam).
    Ciao!


    -- Aut Roma Aut Nihil!

  5. #5
    Guest

    Predefinito

    ho controllato che non ci siano errori di batteture nell'inserimento dell'indirizzo e-mail, ho letto anche la discussione di cui hai fatto collegamento (tra l'altro molto bella), ho anche applicato questo form, ma il problema resta sempre questa:"invia l'e-mail ma non arriva nella nella mia casella postale nulla, non vorrei che ci siano delle opzioni da configurare nel mio spazio che permetta la spedizione del messaggio?

  6. #6
    L'avatar di funcool
    funcool non è connesso Utente storico
    Data registrazione
    05-02-2004
    Residenza
    Qui... Non lì, qui!
    Messaggi
    15,433

    Predefinito

    Scrivi il codice che utilizzi.
    Non devi configurare nulla sul tuo spazio per spedire e-mail tramite PHP.
    Mattia vi manda a FunCool - Matriz - Directory Gogol - Sfondo rosso per la Birmania
    «Tu mi dai fastidio perché ti credi tanto un Dio!» «Bè, dovrò pur prendere un modello a cui ispirarmi, no?» Woody Allen

  7. #7
    Guest

    Predefinito

    pagina html "index.html":
    Codice HTML:
    <body>
    <form  method="post" action="sme_form.php" name='form'  onSubmit='return checa_formulario(this)'>
    <table width="70%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="eeeeee">
        <tr bgcolor="#FFFFFF"> 
          <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Nome Cognome:</FONT></div></td>
          <td width="70%" > <input type="text" name="Name" size="40"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*e-mail:</FONT></div></td>
          <td width="70%" > <input type="text" name="Email" size="40"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%"  ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Oggetto:</FONT></div></td>
          <td width="70%"><input name="sub" type="text"  size="40"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Commento</FONT></div></td>
          <td width="70%"><textarea name="Message" cols="40" rows="5" ></textarea> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="30%" nowrap><input type="hidden" name="sme_form" value="1"></td>
          <td width="70%"><input type="submit"  value="Invia"  name="submit"> 
            <input type="reset"  value="Canc"    name="reset"> 
          </td>
        </tr>
      </table>
    </form>
    </body>

    sme_form.php:
    Codice PHP:
    <?php
    /*****************************************************************/
    /* Program Name : SmE Form */
    /* Program Version : 1.0 */
    /* Program Author : Estevan Simonyi */
    /* Site : http://www.scriptme.com */
    /* Email : scriptme@scriptme.com */
    /* */
    /* Copyright (c) 2004 Scriptme.com All rights reserved. */
    /* Do NOT remove any of the copyright notices in the script. */
    /* This script can not be distributed or resold by anyone else */
    /* than the author, unless special permisson is given. */
    /* */
    /*****************************************************************/
    /*********************************************************************************
    * Filename: sme_form.php
    *********************************************************************************/
    // change the variables bellow
    // Your email here
    $email1 = "mio@indirizzo.it";

    // Contact formname
    $sme_form_c = "Contact form from www.scriptme.com";

    // your site URL
    $homepageurl = "http://www.xxxxxx.it";

    // automatic message send to user send email
    $tnk = " we recive your email now soon we send the solution";
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    ?>
    <script Language="JavaScript">
    <!--
    function checa_formulario(form){
    if (form.Name.value == ""){
    alert("Please your name!");
    form.Name.focus();
    return (false);
    }
    if (form.sub.value == ""){
    alert("Please Message Subject!");
    form.sub.focus();
    return (false);
    }
    if (form.Message.value == ""){
    alert("Please your Message!");
    form.Message.focus();
    return (false);
    }
    if (form.Email.value.indexOf('@', 0) == -1){
    alert("Please your E-mail!");
    form.Email.focus();
    return (false);

    }
    return (true);
    }
    //-->
    </script>
    <form method="post" action="" name='form' onSubmit='return checa_formulario(this)'>
    <?php
    $date
    = date("m/d/Y H:i:s");
    if (!
    $_POST['sme_form']) { ?>
    <table width="70%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="eeeeee">
    <tr bgcolor="#FFFFFF">
    <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Nome Cognome:</FONT></div></td>
    <td width="70%" > <input type="text" name="Name" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*email:</FONT></div></td>
    <td width="70%" > <input type="text" name="Email" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Oggetto:</FONT></div></td>
    <td width="70%"><input name="sub" type="text" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Commento</FONT></div></td>
    <td width="70%"><textarea name="Message" cols="40" rows="5" ></textarea>
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" nowrap><input type="hidden" name="sme_form" value="1"></td>
    <td width="70%"><input type="submit" value="Invia" name="submit">
    <input type="reset" value="Canc" name="reset">
    </td>
    </tr>
    </table>
    </form>
    <?php }

    else
    {
    echo
    "<table width=100%><tr>
    Grazie per il commento, e buon proseguiment nel Forum :
    $_POST[Name]!
    <br><br>è stato inviato un e-mail al : <b>
    $_POST[Email]
    </tr></table></center>"
    ;

    mail("$email1", "$sme_form_c","
    Message sent in
    $date
    --------------------------------------------------------

    Name :
    $_POST[Name]
    Email :
    $_POST[Email]
    Subject :
    $_POST[sub]
    Message :
    $_POST[Message]
    --------------------------------------------------------
    Powered by SmE Form.\n
    Script by http://www.scriptme.com\n\n
    "
    ,"From: $_POST[Email]");

    mail("$_POST[Email]","$homepageurl ", " $Name\n
    ---------------------------------------------\n
    Dear:
    $_POST[Nome]\n
    $tnk \n
    ---------------------------------------------\n
    Powered by SmE Form.\n
    Script by http://www.scriptme.com\n\n"
    ,"From: $email1");
    }
    ?>
    ho provato ad inserirlo in un altro spazio (tripod) ma mi risponde con messaggio di errore
    "Grazie per il commento, e buon proseguiment nel Forum : nome!

    è stato inviato un e-mail al : xxxxxxxx@alice.it

    Echec ! Errors :
    Error checking Quota: Unknown database 'mail_db'
    Error initializing quota: Unknown database 'mail_db'
    Checking mail quota: Unknown database 'mail_db'

    Echec ! Errors :
    Error checking Quota: Unknown database 'mail_db'
    Error initializing quota: Unknown database 'mail_db'
    Checking mail quota: Unknown database 'mail_db'"
    Ultima modifica di belfar : 12-10-2007 alle ore 09.38.54

  8. #8
    L'avatar di funcool
    funcool non è connesso Utente storico
    Data registrazione
    05-02-2004
    Residenza
    Qui... Non lì, qui!
    Messaggi
    15,433

    Predefinito

    Facendo queste modifiche ricevi qualche errore? L'e-mail al mittente non viene spedita perché su AlterVista possono essere spedite 1,5 e-mail al secondo.
    Codice PHP:
    <?php
    /*****************************************************************/
    /* Program Name : SmE Form */
    /* Program Version : 1.0 */
    /* Program Author : Estevan Simonyi */
    /* Site : http://www.scriptme.com */
    /* Email : scriptme@scriptme.com */
    /* */
    /* Copyright (c) 2004 Scriptme.com All rights reserved. */
    /* Do NOT remove any of the copyright notices in the script. */
    /* This script can not be distributed or resold by anyone else */
    /* than the author, unless special permisson is given. */
    /* */
    /*****************************************************************/
    /*********************************************************************************
    * Filename: sme_form.php
    *********************************************************************************/
    // change the variables bellow
    // Your email here
    $email1 = "mio@indirizzo.it";

    // Contact formname
    $sme_form_c = "Contact form from www.scriptme.com";

    // your site URL
    $homepageurl = "http://www.xxxxxx.it";

    // automatic message send to user send email
    $tnk = " we recive your email now soon we send the solution";
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    // not change more anything
    ?>
    <script Language="JavaScript">
    <!--
    function checa_formulario(form){
    if (form.Name.value == ""){
    alert("Please your name!");
    form.Name.focus();
    return (false);
    }
    if (form.sub.value == ""){
    alert("Please Message Subject!");
    form.sub.focus();
    return (false);
    }
    if (form.Message.value == ""){
    alert("Please your Message!");
    form.Message.focus();
    return (false);
    }
    if (form.Email.value.indexOf('@', 0) == -1){
    alert("Please your E-mail!");
    form.Email.focus();
    return (false);

    }
    return (true);
    }
    //-->
    </script>
    <form method="post" action="" name='form' onSubmit='return checa_formulario(this)'>
    <?php
    $date
    = date("m/d/Y H:i:s");
    if (!
    $_POST['sme_form']) { ?>
    <table width="70%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="eeeeee">
    <tr bgcolor="#FFFFFF">
    <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Nome Cognome:</FONT></div></td>
    <td width="70%" > <input type="text" name="Name" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%"> <div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*email:</FONT></div></td>
    <td width="70%" > <input type="text" name="Email" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Oggetto:</FONT></div></td>
    <td width="70%"><input name="sub" type="text" size="40">
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" ><div align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>*Commento</FONT></div></td>
    <td width="70%"><textarea name="Message" cols="40" rows="5" ></textarea>
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="30%" nowrap><input type="hidden" name="sme_form" value="1"></td>
    <td width="70%"><input type="submit" value="Invia" name="submit">
    <input type="reset" value="Canc" name="reset">
    </td>
    </tr>
    </table>
    </form>
    <?php }

    else
    {
    echo
    "<table width=100%><tr>
    Grazie per il commento, e buon proseguiment nel Forum :
    {$_POST['Name']}!
    <br><br>è stato inviato un e-mail al : <b>
    {$_POST['email']}
    </tr></table></center>"
    ;

    mail($email1, $sme_form_c,"
    Message sent in
    {$date}
    --------------------------------------------------------

    Name :
    {$_POST['Name']}
    Email :
    {$_POST['email']}
    Subject :
    {$_POST['sub']}
    Message :
    {$_POST['Message']}
    --------------------------------------------------------
    Powered by SmE Form.\n
    Script by http://www.scriptme.com\n\n
    "
    ,"From: {$_POST['email']}");

    mail($_POST['email'],"{$homepageurl} ", " {$Name}\n
    ---------------------------------------------\n
    Dear:
    {$_POST['Nome']}\n
    {$tnk} \n
    ---------------------------------------------\n
    Powered by SmE Form.\n
    Script by http://www.scriptme.com\n\n"
    ,"From: {$email1}");
    }
    ?>
    Mattia vi manda a FunCool - Matriz - Directory Gogol - Sfondo rosso per la Birmania
    «Tu mi dai fastidio perché ti credi tanto un Dio!» «Bè, dovrò pur prendere un modello a cui ispirarmi, no?» Woody Allen

  9. #9
    Guest

    Predefinito

    grazie molto per la modifica fatto, che sicuramente ha migliorato il form, ma penso di aver capito il problema : ho provato tutti questi form su un altro spazio altervista che abbia un portale funzionante - hanno funzionato tutti e correttamente, invece sul mio spazio che ancora vuoto, non funzionano, ho provato su un spazio vuoto tripod a mettere il file form ma non ha funzionato, è possibile?, anche se ..... non vorrei sbagliare.... mi ricordo qualche anno fa avevo messo un file form php che faccia server per una pagina html su un altro spazio e funzionava correttamente, possibile o mi ricordo male? correggemi per piacere perchè voglio proprio capire!

  10. #10
    L'avatar di funcool
    funcool non è connesso Utente storico
    Data registrazione
    05-02-2004
    Residenza
    Qui... Non lì, qui!
    Messaggi
    15,433

    Predefinito

    Non c'entra se il sito è vuoto o meno. Se lo script funziona su un account su AlterVista, deve funzionare su tutti gli account.
    Ripeto la richiesta: lo script che ho modificato io ti dà qualche errore?
    Mattia vi manda a FunCool - Matriz - Directory Gogol - Sfondo rosso per la Birmania
    «Tu mi dai fastidio perché ti credi tanto un Dio!» «Bè, dovrò pur prendere un modello a cui ispirarmi, no?» Woody Allen

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •