In my plugin, I'm sending an email like this:
$recipients = 'email@example.com'; $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 = 'firstname.lastname@example.org, email@example.com';
... and it generates an error:
Invalid address: firstname.lastname@example.org, email@example.com
How do I properly send an email to multiple recipients?