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");
有帮助吗?

解决方案

You have to use an array of recipients:

$message->cc=(array("mail1@gmail.com","mail2@gmail.com"));

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top