Page 1 of 1

Creating a batch list

Posted: Tue Aug 11, 2009 8:13 pm
by tgavin
I'm trying to set up 4.0.3 and am having difficulty creating the batch email list. Here's what I'm trying to do

Code: Select all

for($i=0;$i<count($toEmail);$i++){
    $to .= $toEmail[$i].',';
}
$to = rtrim($to,',');
 
// Create the message
$message = Swift_Message::newInstance('Wonderful Subject')
    ->setFrom(array('do-not-reply@domain.com' => 'administrator'))
    ->setTo(array($to))
    ->setBody('I thought you might like this!','text/html')
;
Obviously this doesn't work. What can I do to build that array?