Page 1 of 1

How to use array recipient list on swiftmailer?

Posted: Mon Sep 25, 2006 11:53 pm
by shneoh
Hi,

I was tried the swiftmailer few days but still cant get the array recipient list done. Any working example can give?

Here's the code:

Code: Select all

//----  Receipent Address  ----//
	$TO = array(
	        array('Member A','<A@A.com.my>'),
		array('Member B','<B@B.com.my>'),
		array('Member C','<C@gmail.com>')
	);
Is this correct?

Thanks,
Nelson

Posted: Tue Sep 26, 2006 8:51 am
by Chris Corbyn
Take out the < and >.

I can't remember what my code looks like there but I should probably scan to check if you've put them in already.

Posted: Tue Sep 26, 2006 9:56 pm
by shneoh
There is another question:

When I use addCc as follow, it returns no errors and never send mails to these CC receipients:

Code: Select all

$mailer->addCc("Name1" <email@address.com>);
$mailer->addCc("Name2" <email2@address.com>);
$mailer->addCc("Name3" <email3@address.com>);
But when I changed to follow, it works:

Code: Select all

$mailer->addCc('email@address.com');
$mailer->addCc('email2@address.com');
$mailer->addCc('email3@address.com');
Any hints?

Just a suggestion: The online documents should have at least one example on how to correctly code them. The information provided there is not really friendly to all people.

ps: I noted about this dev forum from your swiftmailer webpage. Thanks for the link. :)