Visualizzazione dei risultati da 1 a 4 su 4

Discussione: invio e-mail

  1. #1

    invio e-mail

    salve a tutti...ho un piccolo problemino con lo script ke ho fatto per inviare delle mail..

    a me interessa uno script che, da una pagina con delle caselle di riepilogo a discesa, io seleziono le varie scelte...i vari prodotti...e poi invio una mail con, come corpo del messaggio, tutte le scelte effettuate...
    allora, ho dichiarato nella prima pagina, le caselle a riepilogo così:

    <p style="margin-top: 9px; margin-bottom: 9px" align="center">
    <select size="1" name="T22" style="font-family: tempus">
    <option>-----------</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    </select></p>

    poi nel file php, ho scritto così:

    <?// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
    $to = "alfonso717@alice.it";

    // IL SOGGETTO DELLA MAIL
    $subject = "Formazione";

    // COSTRUIAMO IL CORPO DEL MESSAGGIO
    $body .= trim(stripslashes($_POST["T22"])) . "\n\n";
    $body .= "Formazione Titolare\n";
    $body .= trim(stripslashes($_POST["x1"])) . "\n";
    $body .= trim(stripslashes($_POST["x2"])) . "\n";
    $body .= trim(stripslashes($_POST["x3"])) . "\n";
    $body .= trim(stripslashes($_POST["x4"])) . "\n";
    $body .= trim(stripslashes($_POST["x5"])) . "\n";
    $body .= trim(stripslashes($_POST["x6"])) . "\n";
    $body .= trim(stripslashes($_POST["x7"])) . "\n";
    $body .= trim(stripslashes($_POST["x8"])) . "\n";
    $body .= trim(stripslashes($_POST["x9"])) . "\n";
    $body .= trim(stripslashes($_POST["x10"])) . "\n";
    $body .= trim(stripslashes($_POST["x11"])) . "\n\n";
    $body .= "Formazione Riserve\n";
    $body .= trim(stripslashes($_POST["x12"])) . "\n";
    $body .= trim(stripslashes($_POST["x13"])) . "\n";
    $body .= trim(stripslashes($_POST["x14"])) . "\n";
    $body .= trim(stripslashes($_POST["x15"])) . "\n";
    $body .= trim(stripslashes($_POST["x16"])) . "\n";
    $body .= trim(stripslashes($_POST["x17"])) . "\n";
    $body .= trim(stripslashes($_POST["x18"])) . "\n";

    // INTESTAZIONI SUPPLEMENTARI
    $headers = "From: Formazione";

    // INVIO DELLA MAIL
    if(@mail($to, $subject, $body, $headers)){
    } else{
    echo "Si è verificato un errore durante l'invio. Riprovare o Contatta Al Sith.";
    }
    ?>

    ma la mail nn mi arriva...come mai?? O meglio, quando mesi fa, avevo messo le caselle di testo, invece di quelle a riepilogo, funzionava...come ho messo queste a riepilogo, non funziona più...ho provato anche a rimettere quelle di testo semplici...ma nn mi rifunziona proprio più...
    potreste aiutarmi e dire dov'è l'errore??

  2. #2
    così non fa male agli occhi

    Codice PHP:
     <?// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
    $to "alfonso717@alice.it";

    // IL SOGGETTO DELLA MAIL
    $subject "Formazione";

    // COSTRUIAMO IL CORPO DEL MESSAGGIO
    $body .= trim(stripslashes($_POST["T22"])) . "\n\n";
    $body .= "Formazione Titolare\n";
    $body .= trim(stripslashes($_POST["x1"])) . "\n";
    $body .= trim(stripslashes($_POST["x2"])) . "\n";
    $body .= trim(stripslashes($_POST["x3"])) . "\n";
    $body .= trim(stripslashes($_POST["x4"])) . "\n";
    $body .= trim(stripslashes($_POST["x5"])) . "\n";
    $body .= trim(stripslashes($_POST["x6"])) . "\n";
    $body .= trim(stripslashes($_POST["x7"])) . "\n";
    $body .= trim(stripslashes($_POST["x8"])) . "\n";
    $body .= trim(stripslashes($_POST["x9"])) . "\n";
    $body .= trim(stripslashes($_POST["x10"])) . "\n";
    $body .= trim(stripslashes($_POST["x11"])) . "\n\n";
    $body .= "Formazione Riserve\n";
    $body .= trim(stripslashes($_POST["x12"])) . "\n";
    $body .= trim(stripslashes($_POST["x13"])) . "\n";
    $body .= trim(stripslashes($_POST["x14"])) . "\n";
    $body .= trim(stripslashes($_POST["x15"])) . "\n";
    $body .= trim(stripslashes($_POST["x16"])) . "\n";
    $body .= trim(stripslashes($_POST["x17"])) . "\n";
    $body .= trim(stripslashes($_POST["x18"])) . "\n";

    // INTESTAZIONI SUPPLEMENTARI
    $headers "From: Formazione";

    // INVIO DELLA MAIL
    if(@mail($to$subject$body$headers)){
    } else{
    echo 
    "Si è verificato un errore durante l'invio. Riprovare o Contatta Al Sith.";
    }
    ?>

    cmq venendo a noi, t compare il messaggio di errore di else oppure non arriva la mail?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  3. #3

    risp...

    hai ragione scusa...non sono stato chiaro...

    lo script nn mi da alcun messaggio d'errore...
    ma la mail non arriva......
    ti prego aiutami a risolvere questo errore...xkè sto uscendo matto...
    fino a giugno ha funzionato, poi, proprio ora ke sta per riprendere il fantacalcio, nn funziona più...
    ho provato a togliere queste caselle a discesa, e rimettere semplici caselle di testo, ma nn funziona più niente...HELP!!!!!

  4. #4

    curiosità...

    P.S.: se qualcuno mi spiega, come si fa ad inserire il listato in questa maniera, la prossima volta potrò essere più preciso...grazie.

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.