Guest User

Untitled

a guest
Sep 23rd, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. $matches = array();
  2. if (is_array ($users) && count ($users) > 0) {
  3. foreach ($users as $user) {
  4. $user = new WP_User ($user->ID);
  5. $matches[] = "'" . get_user_field("cell_no", $user->ID) . cellmap(get_user_field("cell_carrier",$user->ID)) . "'";
  6. }
  7. }
  8.  
  9. Array
  10. (
  11. [0] => '1234567891@vtext.com'
  12. [1] => '3216549871@vtext.com'
  13. [2] => '9876543211@vtext.com'
  14. [3] => '6543219877@vtext.com'
  15. )
  16.  
  17. $cell_list = implode(", ", $matches);
  18.  
  19. $outgoing_message = Swift_Message::newInstance('')
  20. ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
  21. ->setTo($cell_list)
  22. ->setBody($message);
  23.  
  24. // Send the message
  25. $result = $mailer->send($outgoing_message);
  26.  
  27. $cell_list = implode(", ", $matches);
  28. $outgoing_message = Swift_Message::newInstance('')
  29. ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
  30. ->setTo($cell_list)
  31. ->setBody($message);
  32.  
  33. $outgoing_message = Swift_Message::newInstance('')
  34. ->setFrom(array('no-reply@mydomain.com' => 'Mydomain'))
  35. ->setTo($matches)
  36. ->setBody($message);
Add Comment
Please, Sign In to add comment