Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $matches = array();
- if (is_array ($users) && count ($users) > 0) {
- foreach ($users as $user) {
- $user = new WP_User ($user->ID);
- $matches[] = "'" . get_user_field("cell_no", $user->ID) . cellmap(get_user_field("cell_carrier",$user->ID)) . "'";
- }
- }
- Array
- (
- [0] => '1234567891@vtext.com'
- [1] => '3216549871@vtext.com'
- [2] => '9876543211@vtext.com'
- [3] => '6543219877@vtext.com'
- )
- $cell_list = implode(", ", $matches);
- $outgoing_message = Swift_Message::newInstance('')
- ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
- ->setTo($cell_list)
- ->setBody($message);
- // Send the message
- $result = $mailer->send($outgoing_message);
- $cell_list = implode(", ", $matches);
- $outgoing_message = Swift_Message::newInstance('')
- ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
- ->setTo($cell_list)
- ->setBody($message);
- $outgoing_message = Swift_Message::newInstance('')
- ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
- ->setTo($matches)
- ->setBody($message);
Add Comment
Please, Sign In to add comment