Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Coding
  5. script registrazione email+invio email

script registrazione email+invio email

Pianificato Fissato Bloccato Spostato Coding
25 Post 3 Autori 6.3k Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • V
    V
    vinarcid0810
    scritto su ultima modifica di
    User Attivo 0
    #12

    c'è qualcosa che nn mi convince....
    allora proviamo (ne approfitto della tua gentilezza) a configurarlo insieme ... se vai qui

    http://www.fgtendaggi.it/mail/maillist.php?action=admin

    entri nel pannello di controllo ecco i dati:

    user
    pass

    entrando nell'amministrazione vedi che ci sono varie possibilità:
    . mandare un messaggio di benvenuto

    • mandare un email di conferma registrazione
    • ed un messaggio quando l'utente si cancella

    ci sono delle varibili:
    %list_name% = The name of the list.
    %email% = The email address the email is being sent it.
    %confirm_url% = URL user must go to to confirm subscription.
    %subscribe_url% = URL users go to to resubscribe.
    %unsubscribe_url% = URL where user can unsubscribe.

    che possono essere inserite nel messaggio .....
    ora io vorrei scrivere la variabile nome in questo modo ....

    grazie per il tuo aiuto

    1 Risposta Ultima Risposta
    Miglior risposta 0
    0
    • I
      I
      ienavr
      scritto su ultima modifica di
      User Attivo 0
      #13

      ho modificato una cosa nella configurazione

      devi poi sostituire la funzione send_welcome($email) originale con questa:

      function send_welcome($email) {
      // Send confirmation letter to new subscriber.
      global $welcome_msg, $welcome_subject, $list_name, $owner_email, $sig, $version, $nome;
      $welcome_subject = replace_shortcuts($welcome_subject, $email);
      $headers = "From: "$list_name" <$owner_email>\nReply-To: $owner_email\nX-Mailer: PHPMailList V$version http://php.warpedweb.net/";
      $welcome_msg .= "\n\n$sig";
      $welcome_msg = replace_shortcuts($welcome_msg, $email);
      $welcome_msg = str_replace("{nome}", $nome, $welcome_msg);
      mail($email, $welcome_subject, $welcome_msg, $headers);
      }

      e dovrebbe andare. Fammi sapere

      1 Risposta Ultima Risposta
      Miglior risposta 0
      0
      • V
        V
        vinarcid0810
        scritto su ultima modifica di
        User Attivo 0
        #14

        ok funziona perfettamente ....
        un ultima cosa .... vorrei che nel file dat si registrasse anche il nome oltre all'email .. il codice in questione che apre e chiude il file è questo:

        function remove_from_list($email) {
        // Removes the address from the file.
        global $list_file;
        $file = @file($list_file);
        $success = false;
        $fd = @fopen($list_file, "w") or die("<center><b>The list data file could not be opened for writing.</b></center>");
        if ($file) {
        foreach($file as $address) {
        $address = trim($address);
        if ($address != $email) fputs($fd, "$address\n");
        else $success = true;
        }
        fclose($fd);
        }
        return $success;
        }

        function add_to_list($email) {
        // Adds the email address to the data file.
        global $list_file;
        $fd = @fopen($list_file, "a") or die("<center><b>The list data file could not be opened.</b><br>Check the path and permissions.</center>");
        fputs($fd, strtolower($email)."\n");
        fclose($fd);
        return true;
        }

        potresti darmi una mano (che spacciato che sono) anche con questa parte di codice ??? 🙂

        1 Risposta Ultima Risposta
        Miglior risposta 0
        0
        • V
          V
          vinarcid0810
          scritto su ultima modifica di
          User Attivo 0
          #15

          per quanto riguarda la scrittura del file ... forse ci sto riuscendo .. allora ecco il codice che ho aggiunto:

          function add_to_list($email) {
          // Adds the email address to the data file.
          $nome = $_POST['nome'];
          global $list_file;
          $fd = @fopen($list_file, "a") or die("<center><b>The list data file could not be opened.</b><br>Check the path and permissions.</center>");
          fputs($fd, strtolower($nome));
          fputs($fd, strtolower($email)."\n");
          fclose($fd);
          return true;
          }

          però cosi il nome e l'email viene attaccato non riesco a dare lo spazio tra le due variabili

          1 Risposta Ultima Risposta
          Miglior risposta 0
          0
          • I
            I
            ienavr
            scritto su ultima modifica di
            User Attivo 0
            #16

            fai così (in questo modo scriverà, ad esempio: nomeutente - [email protected] 😞

            function add_to_list($email) {
            // Adds the email address to the data file.
            $nome = $_POST['nome'];
            global $list_file;
            $fd = @fopen($list_file, "a") or die("<center><b>The list data file could not be opened.</b><br>Check the path and permissions.</center>");
            fputs($fd, strtolower($nome). " - " . strtolower($email)."\n");
            fclose($fd);
            return true;
            }

            1 Risposta Ultima Risposta
            Miglior risposta 0
            0
            • V
              V
              vinarcid0810
              scritto su ultima modifica di
              User Attivo 0
              #17

              perfetto funziona .. ma c'è un piccolo problem ... quando provo a cancellare l'email tramite Unsubscribe selezionato ... l'email non viene cancellata , ovviamente la funzione :
              function remove_from_list($email) {
              // Removes the address from the file.
              global $list_file;
              $file = @file($list_file);
              $success = false;
              $fd = @fopen($list_file, "w") or die("<center><b>The list data file could not be opened for writing.</b></center>");
              if ($file) {
              foreach($file as $address) {
              $address = trim($address);
              if ($address != $email) fputs($fd, "$address\n");
              else $success = true;
              }
              fclose($fd);
              }
              return $success;
              }

              non riconosce:

              nome utente - email

              ?????????????????????

              1 Risposta Ultima Risposta
              Miglior risposta 0
              0
              • I
                I
                ienavr
                scritto su ultima modifica di
                User Attivo 0
                #18

                Prova questa soluzione:

                function remove_from_list($email) {
                // Removes the address from the file.
                global $list_file;
                $file = @file($list_file);
                $success = false;
                $fd = @fopen($list_file, "w") or die("<center><b>The list data file could not be opened for writing.</b></center>");
                if ($file) {
                foreach($file as $address) {
                $address2 = trim(substr(stristr($address, "-"),2));
                if ($address2 != $email) fputs($fd, "$address\n");
                else $success = true;
                }
                fclose($fd);
                }
                return $success;
                }

                1 Risposta Ultima Risposta
                Miglior risposta 0
                0
                • V
                  V
                  vinarcid0810
                  scritto su ultima modifica di
                  User Attivo 0
                  #19

                  Ok Tutto Perfetto ... Sei Ingamba... Ci Sentiamo ...

                  1 Risposta Ultima Risposta
                  Miglior risposta 0
                  0
                  • I
                    I
                    ienavr
                    scritto su ultima modifica di
                    User Attivo 0
                    #20

                    è sempre un piacere aiutare le persone riconoscenti!

                    1 Risposta Ultima Risposta
                    Miglior risposta 0
                    0
                    • V
                      V
                      vinarcid0810
                      scritto su ultima modifica di
                      User Attivo 0
                      #21

                      ienavr ho un piccolo problema ... l'email e nomi posso essere registrati continuamente anche già presente nel file list.dat ... il codice in questione dovrebbe essere questo:

                      function subscribe($email, $nome, $send_confirm, $send_welcome) {
                       // Subscribes address to list.
                       global $list_name;
                       if (($email == ""))
                       {
                         print_subscribe_form();
                       }
                       else {
                        if (!banned($email)) {
                         if (!on_list($email)) {
                          if (valid_email($email)) {
                           if ($send_confirm == "on") { 
                            send_confirm($email);
                            echo "<h4 align=\"center\">\"$nome\" Grazie per la tua registrazione a \"$list_name\".</h4><center>Un e-mail è stata inviata a \"$email\" asking you to confirm your subscription.<br>Please follow those instructions to complete the process.</center>";
                           }
                           else { 
                            if (add_to_list($email)) {
                             echo "<h4 align=\"center\">\"$nome\" l'e-mail: \"$email\" è stata registrata corettamente in \"$list_name\".</h4>";
                             if ($send_welcome == "on") { 
                              send_welcome($email);
                              echo "<br><center>Riceverai a breve un e-mail con le informazioni per scaricare gratuitamente i tuoi due regali, Grazie. <br><br><img src=\"logo copia ok.png\" alt=\"logo Tendaggi\" /><br><br>|<a href=\"http://www.fgtendaggi.it\">Vai alla Home</a>| <a href=\"http://www.fgtendaggi.it/tende%20e%20tendaggi.html\"> Visita il sito</a>|</center>";
                             }
                            }
                           }
                          }
                          else echo "<h4 align=\"center\">L'indirizzo e-mail: \"$email\" non è valido.</h4>";
                         }
                         else echo "<h4 align=\"center\">L'e-mail: \"$email\" risulta già nel nostro database.<br> Se vuoi scaricare nuovamente i due regali contattaci a [email protected]</h4> <br><br><img src=\"logo copia ok.png\" alt=\"logo Tendaggi\" /><br><br>|<a href=\"http://www.fgtendaggi.it\">Vai alla Home</a>| <a href=\"http://www.fgtendaggi.it/tende%20e%20tendaggi.html\"> Visita il sito</a>|</center>";
                        }
                        else echo "<h4 align=\"center\">L'indirizzo e-mail: \"$email\" è sospeso da \"$list_name\".</h4>";
                       }
                      }
                      

                      ma cosa c'è che non và secondo te????????

                      1 Risposta Ultima Risposta
                      Miglior risposta 0
                      0
                      • I
                        I
                        ienavr
                        scritto su ultima modifica di
                        User Attivo 0
                        #22

                        ciao vincenzo e scusa se non ho risposto prima!

                        La funzione da cambiare non è subscribe, ma on_list.

                        Per la precisione devi sostituire questo pezzo di codice:

                        function on_list($email) {
                        // Returns true if email address is on list.
                        global $list_file;
                        $found = false;
                        $file = @file($list_file);
                        if ($file) {
                        foreach ($file as $address) {
                        if (trim($address) == trim($email)) {
                        $found = true;
                        }
                        }
                        }
                        return $found;
                        }

                        con questo:

                        function on_list($email) {
                        // Returns true if email address is on list.
                        global $list_file;
                        $found = false;
                        $file = @file($list_file);
                        if ($file) {
                        foreach ($file as $address) {
                        if ( trim(substr(stristr($address, "-"),2)) == trim($email)) {
                        $found = true;
                        }
                        }
                        }
                        return $found;
                        }

                        Spero che sia tutto corretto!

                        Ciao

                        1 Risposta Ultima Risposta
                        Miglior risposta 0
                        0
                        • V
                          V
                          vinarcid0810
                          scritto su ultima modifica di
                          User Attivo 0
                          #23

                          fantastico ... tutto coretto ... sono ripetitivo ma non posso esimermi dal farti i complimenti 😉

                          1 Risposta Ultima Risposta
                          Miglior risposta 0
                          0
                          • D
                            D
                            davide.al
                            scritto su ultima modifica di
                            User Attivo 0
                            #24

                            Ciao a tutti, nn riesco ad accedere all'area amministrazione mi date una mano? nn so configurarlo forse

                            function admin() {
                            // Controls the administration options.
                            global $q, $username, $password, $user, $pass;
                            if (($user == $username) && ($pass == $password)) {
                            if ($q == "send_msg") admin_send_msg();
                            elseif ($q == "send_msg_confirm") admin_send_msg_confirm();
                            elseif ($q == "write_msg") admin_write_msg();
                            elseif ($q == "view_subs") admin_view_subs();
                            elseif ($q == "config") admin_config();
                            elseif ($q == "add_remove") admin_add_remove();
                            admin_print_options();
                            }
                            else {
                            if (($username == "MIAUSERNAME") && ($password == "MIA PASSWORD)) admin_print_logon("");
                            else admin_print_logon("Invalid username and/or password.");
                            }
                            }

                            CHE DEVO SCRIVERE IN QUEI CAMPI? GRAZIE RAGAZZI

                            1 Risposta Ultima Risposta
                            Miglior risposta 0
                            0
                            • D
                              D
                              davide.al
                              scritto su ultima modifica di
                              User Attivo 0
                              #25

                              SCUSATE ANCORA, HO UN'ALTRO PROBLEMA..... MA NEI CAMPI
                              if ($email == "") DEVO METTERE LA EMAIL DEL SITO?

                              function subscribe($email, $nome, $send_confirm, $send_welcome) {
                              // Subscribes address to list.
                              global $list_name;
                              if ($email == "")
                              {
                              print_subscribe_form();
                              }
                              else {
                              if (!banned($email)) {
                              if (!on_list($email)) {
                              if (valid_email($email)) {
                              if ($send_confirm == "on") {
                              send_confirm($email);
                              echo "<h4 align="center">"$nome" Thank you for subscribing to "$list_name".</h4><center>An email will be sent to "$email" asking you to confirm your subscription.<br>Please follow those instructions to complete the process.</center>";
                              }
                              else {
                              if (add_to_list($email)) {
                              echo "<h4 align="center">"$nome" The email address: "$email" has been subscribed to "$list_name".</h4>";
                              if ($send_welcome == "on") {
                              send_welcome($email);
                              echo "<br><center>A welcome message will be emailed to you confirming this.</center>";
                              }
                              }
                              }
                              }
                              else echo "<h4 align="center">The email address: "$email" does not appear to be valid.</h4>";
                              }
                              else echo "<h4 align="center">The email address: "$email" is already subscribed to this list.</h4>";
                              }
                              else echo "<h4 align="center">The email address: "$email" has been banned from "$list_name".</h4>";
                              }
                              }

                              function unsubscribe($email) {
                              // Removes email from list if it exists.
                              global $list_file, $list_name, $send_goodbye;
                              if ($email == "") {
                              print_subscribe_form();
                              }
                              else {
                              if (remove_from_list($email)) {
                              echo "<center><b>The email address: "$email" has been removed from "$list_name".</b>";
                              if ($send_goodbye == "on") {
                              send_goodbye($email);
                              echo "<br>A email confirming this will be sent to "$email".";
                              }
                              echo "</center>";
                              }
                              else echo "<center><b>The email address: "$email" is not subscribed to "$list_name".</b>";
                              }
                              }

                              1 Risposta Ultima Risposta
                              Miglior risposta 0
                              0

                              Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

                              Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

                              Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

                              Registrati Accedi
                              Rispondi
                              • Risposta alla discussione
                              Effettua l'accesso per rispondere
                              • Da Vecchi a Nuovi
                              • Da Nuovi a Vecchi
                              • Più Voti


                              • Accedi

                              • Non hai un account? Registrati

                              • Accedi o registrati per effettuare la ricerca.
                              • Primo post
                                Ultimo post
                              Home Accedi Registrati
                              Menu
                              • CATEGORIES
                              • La Community Connect.gt
                              • Presentati alla Community
                              • News Ufficiali da Connect.gt
                              • Internet News
                              • A Scuola Di
                              • Digital Marketing
                              • Intelligenza Artificiale
                              • SEO & GEO
                              • Web Marketing e Content
                              • Google Analytics e Web Analytics
                              • Google Ads & Advertising
                              • YouTube
                              • TikTok, Instagram e altri Social
                              • Google Adsense, Affiliazioni e Guadagno
                              • E-Commerce
                              • Coding e Sistemistica
                              • Help Center: consigli per il tuo progetto
                              • Hosting e Cloud
                              • Coding
                              • CMS & Piattaforme Self-Hosted
                              • Annunci e Collaborazioni
                              • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
                              • Collaborazioni WEB e Lavoro: offro e cerco
                              • Impresa, Fisco e Leggi
                              • Consulenza Legale e Professioni Web
                              • Consulenza Fiscale, Imprese, Startup e P.Iva
                              • Gli Off Topic
                              • PC, Smartphone e altri Hardware
                              • Tutti i Software
                              • GT Fetish Cafè
                              • Discussioni
                              • Non letti 0
                              • Recenti
                              • Hashtag
                              • Popolare
                              • Utenti
                              • Privacy
                              • Termini e condizioni
                              • © 2026 Search On Media Group S.r.l.