How can PHP be utilized to handle form submissions and send emails to multiple recipients without exposing all email addresses?

To handle form submissions and send emails to multiple recipients without exposing all email addresses, you can use the BCC (Blind Carbon Copy) feature in PHP's mail function. By adding all the email addresses to the BCC header, the recipients will not see each other's email addresses. This helps maintain the privacy of the recipients.

<?php
$to = 'recipient1@example.com, recipient2@example.com'; // main recipient
$subject = 'Subject of the email';
$message = 'Body of the email';
$headers = 'From: sender@example.com' . "\r\n";
$headers .= 'Bcc: recipient3@example.com, recipient4@example.com' . "\r\n";

mail($to, $subject, $message, $headers);
?>