I have two arrays consisting of a list emails which I need to send through swift mailer.
Here is the format of the array
$array1 = Array ( [0] => test1@testserver1.com [1] => test2@testserver1.com)
$array2 = Array ( [0] => test1@testserver2.com [1] => test2@testserver2.com)
In Swift Mailer, I tried sending mail like this
->setTo(array($array1,$array2))
but it is resulting in an error.
Can some one please help me with this.
setToaccepts an array. You’ll want to merge your arrays into one: