In my plugin, I'm sending an email like this:
$recipients = 'firstname.lastname@example.org'; $email = new EmailModel(); $email->toEmail = $recipients; $email->subject = 'My Email Subject'; $email->body = 'My Email Body'; craft()->email->sendEmail($email);
Which works great! But when I'm sending to multiple people, the string would look like this...
$recipients = 'email@example.com, firstname.lastname@example.org';
... and it generates an error:
Invalid address: email@example.com, firstname.lastname@example.org
How do I properly send an email to multiple recipients?