Yii Framework: Send mail to multiple recipients with YiiMailMessage
-
21-12-2019 - |
Question
I need to add multiple CC email recipients using YiiMailMessage. Recipients get them from a table.
Try these ways and does not work
$message->cc=("mail1@gmail.com, mail2@gmail.com");
$message->cc=("mail1@gmail.com; mail2@gmail.com");
Solution
You have to use an array of recipients:
$message->cc=(array("mail1@gmail.com","mail2@gmail.com"));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow