PHP

HOW TO SEND MAIL TO MULTIPLE RECIPIENTS IN PHP

mail (TO, SUBJECT, MESSAGE, HEADERS, OPTIONS);

TO - Recipient SUBJECT - Subject of email MESSAGE - Main body of email HEADERS - Optional email headers OPTIONS - Additional options

BASIC PHP MAIL FUNCTION

01

SEPARATE EMAILS WITH COMMA mail (   "joe@doe.com, jon@doe.com",   "SUBJECT", "MESSAGE" );

MULTIPLE RECIPIENTS

02

mail (   "joe@doe.com, "jon @doe.com",   "SUBJECT", "MESSAGE",   implode("\r\n", [     "MIME-Version: 1.0",     "Content-type: text/plain;".     "charset=utf-8",     "Cc: joy@doe.com, "joz@doe.com",     "Bcc: jaz@doe.com, "jan@doe.com"   ]) );

SET MAIL CC & BCC

03