- Edited
I want to send an SMS to user when he/she create a new ticket So i have call a function send_SMS on onNewTicket function.I have successfully send SMS to my number but I want to send sms to user's number, So i couldn't get user phone number in onNewTicket function.My code:<pre>foreach( $recipients as $k=>$staff) { if(!is_object($staff) || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue; $alert = $this->replaceVars($msg, array('recipient' => $staff)); $email->sendAlert($staff, $alert, $alert, null, $options); $sentlist = $staff->getEmail(); } } $numbers = '99********'; // this is static number I want to send on user's number. send_SMS($numbers,$myMSG);</pre>