- Edited
I have create a sms function where i send an message with staff's agents number.i have successfully send an sms to agent but i couldn't not send ticket number to agent in SMS on onAssign function.here is my code :smsbody code:<pre>$smsMsg='New ticket assigned->priority: '.$this->getPriority().' from '.$this->getName().' ('.$this->getEmail().')';$smsMsg.=' Due: '.$this->getSLADueDate();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(); $number = $staff->getMobile(); send_SMS($number,$smsMsg); }</pre>