CrimsonGT Posted June 15, 2009 Share Posted June 15, 2009 Alright so I just got WHMCS yesterday, but I am trying to setup a action hook to send a text message to my phone when a support ticket is opened. I havent used php in years so I was just tinkering, I know its a problem using mail() but im not sure what a good alternative would be, or how I could get mail() to work. I read that you can use google something or another, but it would be nice if I could just send the email from one of my own email addresses. One other question I had is I will be adding TCAdmin soon and using the module. Would it be possible to set it up so I can send text messages to clients phones after their server is setup? Anyways, any help would be appreciated! <?php function SendSMS_NewTicketAlert() { $vars = func_get_args(); $to = "1XXXXXXXXXX@messaging.sprintpcs.com"; $dept = $vars['deptname']; $subject = "Brutal Servers - New Ticket"; $body = "Hi,\n\nYou have a new Support Ticket\nDept: $dept"; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } } add_hook("TicketOpen",1,"SMS_Admin_NewTicket",""); ?> 0 Quote Link to comment Share on other sites More sharing options...
CrimsonGT Posted June 18, 2009 Author Share Posted June 18, 2009 Any thoughts on what would need to be changed for this to work? 0 Quote Link to comment Share on other sites More sharing options...
mukoshy Posted October 27, 2012 Share Posted October 27, 2012 @CrimsonGT Your hook should be: add_hook("TicketOpen",1,"SendSMS_NewTicketAlert",""); not the other way round, you added "Admin" which is not in the function. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.