Paul's Programming Notes     Archive     Feed     Github

WHMCS Hook - Trigger E-mail On New User Sign-Up

This script needs to go into your WHMCS hooks folder (root/includes/hooks/):

<?php

 function send_invitiation_email($vars) {

     $command = "sendemail";
$adminuser = "admin"; // Your admin username
$values["messagename"] = "Google Groups Invitation"; // exact name of e-mail template
$values["id"] =  $vars['userid'];

$results = localAPI($command,$values,$adminuser);

 }

 add_hook("ClientAdd",1,"send_invitiation_email");

 ?>