Given the ambiguity of the original request, either response could be correct. Learn how to send emails in php using smtp or api Phpmailer, symfony mailer, and mail () function Sending the same email to multiple recipients using phpmailer is straightforward and flexible The sendlayer sdk also supports sending emails to multiple recipients, including cc and bcc email addresses You have to create a completely different phpmailer object for the second email, or you could just use addaddress to send the same email to multiple addresses
If you don't want the senders to see each other, use bcc. After about an hour of debugging i've discovered the meaning of the undocumented php warning Invalid argument ($errorcode = 13) This occurred when the size of $message was larger than msg_qbytes (see msg_stat_queue() for how to determine and change msg_qbytes).
WATCH