"sendmail" is a program which delivers mail over the Internet. Most web hosting providers include sendmail which your PHP website can use. You cannot send email from your local development environment unless you install sendmail or its equivalent on your local machine.
The PHP "mail()" command is part of the PHP core, and is the primary way in which to send email from PHP. mail($to, $subject, $message, $additionalHeaders) For multiple recipients, separate the email addresses of the recipients with commas
It is recommended that you use an external library, such as PHPMailer On the PHPMailer object $mail, issue the $mail->IsSMTP() command and then configure the needed parameters as required by your SMTP server