Code: Select all
Warning: preg_match() expects parameter 2 to be string, array given in Swift.php on line 1144I'm trying to send to multiple recipients, but swift is spitting out the above warning for each recipient in the $to array...
the $to array is:
Code: Select all
array(7) {
[0]=>
array(2) {
[0]=>
string(10) "Jeff Brown"
[1]=>
string(13) "jeff@example.com"
}
...
...Code: Select all
require_once('Swift.php');
require_once('Swift/Connection/SMTP.php');
$swift = new Swift(new Swift_Connection_SMTP($_config['app']['smtpserver']));
foreach ($recips as $recip) $to[] = array($recip['name'],$recip['email']); // didnt work with associative indexes, possible feature suggestion *****
$swift->send($to, $_config['register']['from'], 'Personal Message: I Was Thinking Of You!', $tpl);
dump($swift->transactions);
dump($swift->errors);Any ideas what's going on??
I haven't tried much to fix it as i have plenty of other work to do on this project...
<edit>
I just recieved the email on my gmail account... usually they arrive instantly, i'm now wondering why it took so long...
</edit>