There are a few solutions to this. I can offer you one.
When you submit the form and get all of your values, check for the checkbox values.
One way of doing this is saying:
$mail1 = ($_POST['mail1'] == 1) ? 1 : 0;
This is shorthand for:
$mail1 = $_POST['mail1];
if ($mail1 != 1)
$mail1 == 0;
Once you have that you can check who should be getting the e-mail.
Assuming you are using the mail() function to send the e-mail out to those checked, you can do the following:
$body .= "Message Body";
//Set the headers to reflect what you are using
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Blah <blah@blah.com>\r\n";
//optional
$headers .= "Reply-To: No Reply <noreply@blah.com>\r\n";
//You need to do some checking to make sure you have commas where they
//belong that is not included in this code.
$to = "";
if ($mail1 == 1)
$to .= "[insert mail1 email address"];
if ($mail2 == 1)
$to .= ", [insert mail2 email address"];
ETC.
mail($to, $subject, $body, $headers);
To add CC and BCC information, in the $header, you can add a line of CC: or BCC: and add the addresses to that.
Hope that helps.