Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    script per mailing list non funzionante

    Ho scaricato lo script in php di Aruba per potersi iscrivere dal mio sito alla mailing list chiamata newsletter.

    http://vademecum.aruba.it/start/pann...ling_list.shtm

    Ho creato la pagina per l'iscrizione:
    http://www.altrospazio.it/iscrizione.php

    Però non funziona!
    Compare sì il messaggio di avvenuta iscrizione, ma in realtà la richiesta non viene spedita.

    Lo script richiede solo due modifiche:
    1. nome dominio
    2. nome della lista

    Chi mi dà una mano?

  2. #2

    Aiuto!

    Provo anche ad inserire lo script php.
    Qualcuno può dare una controllata?

    <?php
    //'''''''''' inserire il nome del dominio
    $DOMAIN='altrospazio.it';
    //'''''''''' inserire il nome della lista o delle liste
    $LISTS[]='newsletter';
    $LISTS[]='altra_lista';
    //''''''''fine configurazione


    $response_template='


    <center>
    <div align="center">
    <table border="0" cellspacing="1" cellpadding="2" width="570">
    <tr>
    <td align="center">
    %%ACTION%% %%LIST%%@%%DOMAIN%%
    </td>
    </tr>
    <tr>
    <td class="response">
    Riceverai una mail a breve su &quot;%%ADDRESS%%&quot;. Quello che devi fare è usare la funzione "Rispondi" del tuo client di posta
    ed inviare tale risposta: non è necessario scrivere nulla.
    </td>
    </tr>
    </table>
    </div>
    </center>
    ';

    ?>
    <html>
    <head>
    <title>Iscrizione a mailing-list in php</title>
    <style>
    body {
    background-color:#ffcb8c;
    color:white;
    }
    td { background-color:#ffcb8c; color:red; font-weight:bold;font-family:verdana;}
    td.response { background-color:#ffca000; color:red; font-weight:normal; font-family:verdana; }

    </style>
    </head>
    </body>
    <center><div align="center">
    <table border="0" cellspacing="0" cellpadding="0" width="570">
    <form method="post">
    <tr>
    <td align="center">Indirizzo email</td>
    <td align="center">Nome Lista / Azione</td>
    <td align="left"></td>
    </tr>
    <tr>
    <td align="center"><input type="text" value="<?php echo $_GET['a']; ?>" name="addy" size="30"></td>
    <td align="center"><select name="list"><?php
    if ( is_array($LISTS)) {
    foreach ( $LISTS as $val ) {
    echo '<option value="'.$val.'">'.$val.'@'.$DOMAIN.chr(10);
    }
    }
    ?></select><select name="action"><option value="subscribe">Iscriviti<option value="unsubscribe">Rimuovi iscrizione</select></td>

    <td align="left"><input type="submit" value="GO!"></td>
    </tr>
    </form>
    </table>
    </center></div>
    <?php
    switch ( $_POST['action'] ) {
    case 'subscribe':
    if ( !empty($_POST['addy']) ) {
    if ( mail($list.'-subscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'', '') ) {
    show_tpl($response_template, 'ISCRITTO A: ', $list, $DOMAIN, $_POST['addy']);
    }
    }
    break;

    case 'unsubscribe':
    if ( !empty($_POST['addy']) ) {
    if ( mail($list.'-unsubscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'', '') ) {
    show_tpl($response_template, 'RIMOSSO DA: ', $list, $DOMAIN, $_POST['addy']);
    }
    }
    break;
    }

    function show_tpl($tpl, $action, $list, $domain, $address) {
    $tpl=str_replace('%%ACTION%%', $action, $tpl);
    $tpl=str_replace('%%LIST%%', $list, $tpl);
    $tpl=str_replace('%%DOMAIN%%', $domain, $tpl);
    $tpl=str_replace('%%ADDRESS%%', $address, $tpl);
    echo $tpl;
    }
    ?>
    </body>
    </html>

  3. #3
    Ciao io ho intenzione di creare un moduletto per Joomla che sia più snello di quello fornito da aruba... Ma se mi dici che non funziona sarebbe una fatica sprecata.


    Possibile che non esista in giro un moduletto già fatto?

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.