and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I added a few recipients like this:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My proposed change to the way the recipient array is handled is as follows:
If an array-item in the passed list contains only one element, use it as the recipient's e-mail address and set the recipient's name to nothing, otherwise carry on as the current code does. Perhaps this should be an option, but possible nonetheless.
joho wrote:My proposed change to the way the recipient array is handled is as follows:
If an array-item in the passed list contains only one element, use it as the recipient's e-mail address and set the recipient's name to nothing, otherwise carry on as the current code does. Perhaps this should be an option, but possible nonetheless.
Hmmm that's already how it works. One-dimensional reads each element as an address. 2-dimensional reads names and addresses.
$recipients = array('address@one.tld', 'address@two.tld', 'address@three.tld'); //1-dimensional
$swift->send($recipients, .... ); //Send to each of the recipients
Indeed; I may not know the status of each "data pair" before I create the recipients array. And when it's available, it's of course always nicer to present a name along with the address. But I don't think a construct of
joho wrote:Indeed; I may not know the status of each "data pair" before I create the recipients array. And when it's available, it's of course always nicer to present a name along with the address. But I don't think a construct of
Don't sweat it; it's not a show stopper. I've removed the usage of recipient names for now, and just supply the function with an array of e-mail addresses. It works, and I can live with it for now.