Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- ## This is how I generate the $to field for my message
- $recipients = array();
- foreach(explode(',',$return) as $email)
- {
- $recipients[] = array($email);
- }
- return $recipients;
- ## which generates this
- (array) Array
- (
- [0] => Array
- (
- [0] => bendalton@gmail.com
- )
- [1] => Array
- (
- [0] => 3173081415@txt.att.net
- )
- )
- ## this is my email send code
- email::send($to, $from, $subject, $message, TRUE);
- ## This is what is eventually generated from my array
- (object) Swift_RecipientList Object
- (
- [to:protected] => Array
- (
- [bendalton@gmail.com] => Swift_Address Object
- (
- [address:protected] => bendalton@gmail.com
- [name:protected] => Array
- )
- )
- [cc:protected] => Array
- (
- )
- [bcc:protected] => Array
- (
- )
- [iterators:protected] => Array
- (
- [to] =>
- [cc] =>
- [bcc] =>
- )
- )
- ## $recipients[] = $email provides this result
- (object) Swift_RecipientList Object
- (
- [to:protected] => Array
- (
- [bendalton@gmail.com] => Swift_Address Object
- (
- [address:protected] => bendalton@gmail.com
- [name:protected] => 3173081415@txt.att.net
- )
- )
Add Comment
Please, Sign In to add comment