Hotlinks Posted February 19, 2010 Share Posted February 19, 2010 WHMCS rather annoyingly doesnt create tickets when the department email is a CC rather than To. Here is a module to view those tickets and decide whether to create a ticket or not. I did this the simplest way possible which was to just send out another mail with the chosen department as a To recipient. I called it tickets.php and put it in whmcs/modules/admin Use at your own risk, enjoy! Panny <table border=1> <? // configuration $departments = array("sales", "support", "accounts"); $mydomain = "your domain"; // if ($department == "delete") { echo("Selected $department<br>"); mysql_query("update tblticketmaillog set `to` = 'deleted' where id = '$id'"); echo("Email $id deleted"); } else { if ($department) { echo("Selected $department<br>"); mail("$department@$mydomain", "$sub", "$mess", "From: $email\n"); echo("Sent message to $department@$mydomain from $email"); mysql_query("update tblticketmaillog set `to` = 'sentto$department' where id = '$id'"); } } $result = mysql_query("select * from tblticketmaillog where `to` = ''"); while ($row = mysql_fetch_array($result)) { $mess = substr($row[message], 0, 50); $sub = substr($row[subject], 0, 25); echo("<tr><td><form action=$PHP_SELF method=POST><input type=hidden name=module value=Tickets>"); foreach ($departments as $department) { echo("<input type=radio name=department value=$department> $department"); } echo("<input type=radio name=department value=delete> Delete <input type=hidden name=id value=$row[id]> <input type=hidden name=mess value=\"$row[message]\"> <input type=hidden name=sub value=\"$row[subject]\"> <input type=hidden name=email value=\"$row[email]\"> <input type=submit value=\"go\"></form> </td><td>$row[id]</td><td>$row[email]</td><td>$sub</td><td>$mess</td></tr>"); } ?> </table> 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted February 21, 2010 Share Posted February 21, 2010 This seems like a good idea, however you may need to modify the bounce template to cover the fact that they may actually have a ticket opened by this second method 0 Quote Link to comment Share on other sites More sharing options...
just4hosting Posted November 10, 2011 Share Posted November 10, 2011 This seems like a good idea, however you may need to modify the bounce template to cover the fact that they may actually have a ticket opened by this second method how is this progressing? I'd be interested in this ... 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.