GrizzlyBear Posted October 28, 2008 Share Posted October 28, 2008 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 = 'addy@test.co.za , addy2@test.co.za'; $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/'); ?> Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted October 28, 2008 Share Posted October 28, 2008 on the php website, i found that you can either use additional headers like this: $headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; or just use the imap_mail() function, which has cc and bcc options built in. Quote Link to comment Share on other sites More sharing options...
GrizzlyBear Posted October 28, 2008 Author Share Posted October 28, 2008 Thanks for your help hey..Perfect! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.