Jump to content

Action Hook for SMS


CrimsonGT

Recommended Posts

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","");

?>

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated