Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Mail Bcc

  1. #1

    Mail Bcc

    Ho il seguente script che gestisce un form email in php.
    Vorrei aggiungere un indirizzo email in BCC oltre a quello normale $EmailTo (copia carbone silente) come fare? Grazie
    -----------------------------------------------
    <?php
    // Website Contact Form Generator
    // http://www.tele-pro.co.uk/scripts/contact_form/
    // This script is free to use as long as you
    // retain the credit link

    // get posted data into local variables
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
    $EmailTo = "info@info.com";
    $Subject = "Sito";
    $Nome = Trim(stripslashes($_POST['Nome']));
    $Cognome = Trim(stripslashes($_POST['Cognome']));
    $Indirizzo = Trim(stripslashes($_POST['Indirizzo']));
    $Città = Trim(stripslashes($_POST['Città']));
    $Telefono = Trim(stripslashes($_POST['Telefono']));
    $Messaggio = Trim(stripslashes($_POST['Messaggio']));
    $Privacy = Trim(stripslashes($_POST['Privacy']));

    // validation
    $validationOK=true;
    if (Trim($EmailFrom)=="") $validationOK=false;
    if (Trim($Privacy)=="") $validationOK=false;
    if (!$validationOK) {
    print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
    exit;
    }

    // prepare email body text
    $Body = "";
    $Body .= "Nome: ";
    $Body .= $Nome;
    $Body .= "\n";
    $Body .= "Cognome: ";
    $Body .= $Cognome;
    $Body .= "\n";
    $Body .= "Indirizzo: ";
    $Body .= $Indirizzo;
    $Body .= "\n";
    $Body .= "Città: ";
    $Body .= $Città;
    $Body .= "\n";
    $Body .= "Telefono: ";
    $Body .= $Telefono;
    $Body .= "\n";
    $Body .= "Messaggio: ";
    $Body .= $Messaggio;
    $Body .= "\n";
    $Body .= "Privacy: ";
    $Body .= $Privacy;
    $Body .= "\n";

    // send email
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

    // redirect to success page
    if ($success){
    print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
    }
    else{
    print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
    }
    ?>

  2. #2
    Utente di HTML.it L'avatar di nicola75ss
    Registrato dal
    Nov 2004
    Messaggi
    12,922
    In questa pillola è spiegato come fare.
    http://forum.html.it/forum/showthrea...hreadid=513009

  3. #3

    Non è chiaro

    Mi piacerebbe sapere se aggiungendo qualche riga al codice che ho postato precedentemente riesco a risolvere il problema.
    La pillola che mi è stata girata non mi è molto chiara, ovvero non adattabile al mio esempio (dovrei sconvolgere tutto lo script....)
    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.