Jump to content

[SOLVED] Bcc


GrizzlyBear

Recommended Posts

Hi

 

could anyone perhaps help me out with being able to bcc someone from a form on a website. I can send to multiple address' but not sure how to send to one email, and bcc two others.

 

Thanks.

<?php

$to = '[email protected] , [email protected]';
$email = $_POST['Email'];
$name = $_POST['Name'];
$telephone = $_POST['PhoneNumber'];
$surname = $_POST['Surname'];
$golfclub = $_POST['GolfClub'];
$attending = $_POST['Radio1'];
$day = $_POST['Radio2'];
$number = $_POST['Number'];

$message = <<<MESSAGE
<html>
  <head>
    <title>Launch RSVP Form</title>
  </head>
  <body>
    <table style="font: Tahoma, Verdana, Arial, Helvetica, sans-serif" style="font-size:12px" border="0" cellspacing="3" align="center">
      <tr>
        <td align="center" bgcolor="#91a93e" colspan="2"><strong>LAUNCH RSVP FORM</strong></td>
  </tr>
   <tr>
        <td bgcolor="#FFFFFF" colspan="2"></td>
  </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Name</td>
        <td bgcolor="#ADCE39" width="300">$name</td>
      </tr>
   <tr>
        <td bgcolor="#91a93e" width="150">Surname</td>
        <td bgcolor="#ADCE39" width="300">$surname</td>
      </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Telephone</td>
        <td bgcolor="#ADCE39" width="300">$telephone</td>
      </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Home Golf Club</td>
        <td bgcolor="#ADCE39" width="300">$golfclub</td>
      </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Attending</td>
        <td bgcolor="#ADCE39" width="300">$attending</td>
      </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Day Attending</td>
        <td bgcolor="#ADCE39" width="300">$day</td>
      </tr>
  <tr>
        <td bgcolor="#91a93e" width="150">Number Attending</td>
        <td bgcolor="#ADCE39" width="300">$number</td>
      </tr>

    </table>
  </body>
</html>
MESSAGE;

$subject = 'The Bay Launch RSVP';

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ' . $email;




mail($to, $subject, $message, $headers);
header('Location: http://www.thebaygolf.co.za/');
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/130397-solved-bcc/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.