Mail cc and bcc
<?php $headers = "From:sender@java2s.com\r\n"; $recipients = "b@java.com,a@java.com"; mail($recipients, "This is the subject","This is the mail body", $headers); ?>