0 Replies Latest reply on Jan 29, 2010 3:03 AM by yabbox

    php $SendTo $Headers Bcc

    yabbox

      Hi,

       

      I have a php formail which works fine.

       

      However, I want to send a copy of the form to a Bcc email and I can't make it work.  I have added the $Header array, but it isn't catching.

       

      Can someone help me along?

       

      Thanks,
      Andy

       

      Here is a snippet of the code...

       

      if(isset($_POST['Submitted'])) {

         
          $SendTo = "email@gmail.com";
          $Subject = "Online Enquiry";
          $FromString = "From:  ". $_POST['name'] ."  \r\n";
         
          $Headers .= "Bcc: blind@hotmail.com" ." \r\n";

       

          $Indhold = "Please reply to this online enquiry form as soon as possible:\n";
          $Indhold .= "\r";
          $Indhold .= "Subject: ".$_POST['subject']."\n";
          $Indhold .= "\r";
          $Indhold .= "Name: ".$_POST['name']."\n";
          $Indhold .= "\r";

       

       

          $MailSuccess = mail($SendTo,$Subject,$Headers,$Indhold,$FromString);
          header("Location: thanks.php");
          exit;
        }