how to send email to multiple users one by one without BCC and CC using php -
I want to send emails to many users, who have 4 emails with me and each 4 emails are different from others. Just want me to send an email to all of them without BCC and CC stuff so that email them as one. Here is my code:
$ _ session ['eventAdminEmail'] = array (amohsin@test.com, mohsin@test.com, mohsin@test.com, mohsin@test.com ' ); $ ToAdmin = $ _SESSION ['eventAdminEmail']; $ AdminSubject = "Hello"; $ Mail_headers = "MIME-version: 1.0" .PHP_EOL; $ Mail_headers = "Content-type: text / html; charset = ISO-885 9-1" .PHP_EOL; $ Mail_headers = "From: Test Support & lt; test@test.org>". PHP_EOL; If (isset ($ _ session ['eventAdminEmail'])) {mail (explosion (',', $ toAdmin), $ adminSubject, $ adminMessage, $ Mail_headers); }
You can use a loop for it
$ _SESSION ['eventAdminEmail'] = array (mahosine @ test.com, mohsin@test.com, mohsin@test.com, mohsin@test.com '); $ AdminSubject = "Hello"; $ Mail_headers = "MIME-version: 1.0" .PHP_EOL; $ Mail_headers = "Content-type: text / html; charset = ISO-885 9-1" .PHP_EOL; $ Mail_headers = "From: Test Support & lt; test@test.org>". PHP_EOL; If (isset ($ _ session ['eventAdminEmail'])) {$ toAdmin = $ _SESSION ['eventAdminEmail']; $ Arr_emails = Explosion (',', $ toAdmin [0]); Forex Currency ($ arr_emails $ as email) {Mail ($ email, $ adminSubject, $ adminMessage, $ Mail_headers); }}
Comments
Post a Comment