igeek Posted January 21, 2010 Share Posted January 21, 2010 I am looking to create an action hook to send an email template, can someone please advise on how do to this please. 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted January 21, 2010 Share Posted January 21, 2010 hi, you can not CREATE action hooks. you can use the defined action hooks. at which point in time you want to send an email template? do you just want to send an email, or send an email with a whmcs email template? 0 Quote Link to comment Share on other sites More sharing options...
igeek Posted January 21, 2010 Author Share Posted January 21, 2010 i want to set up an hook to send an whmcs email when someone orders a .au 2ld domain. I also wanted to set up the free trials mod to send an email template as well for the reminder 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted January 21, 2010 Share Posted January 21, 2010 for example in <whmcs_root>/includes/hooks/lalalalal.php <?php add_hook("AfterShoppingCartCheckout",1,"init_AfterShoppingCartCheckout",""); function init_AfterShoppingCartCheckout() { $vars = func_get_args(); $orderid = $vars[0]['OrderID']; $ordernumber = $vars[0]['OrderNumber']; $invoiceid = $vars[0]['InvoiceID']; $products = $vars[0]['Products']; $addons = $vars[0]['Addons']; $domains = $vars[0]['Domains']; // put your email send code here // i actually do not know how to send an emailtemplate } ?> 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted January 21, 2010 Share Posted January 21, 2010 you can send emailtemplates with whmcs API http://wiki.whmcs.com/API:Send_Email 0 Quote Link to comment Share on other sites More sharing options...
igeek Posted January 21, 2010 Author Share Posted January 21, 2010 Thanks so much for your help, i work with both your responses 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted January 22, 2010 Share Posted January 22, 2010 When using "Send Email" API function, make sure if it's a general email type you pass a client ID, product email type you pass a product ID, etc... and then it will be fine. 0 Quote Link to comment Share on other sites More sharing options...
igeek Posted January 22, 2010 Author Share Posted January 22, 2010 Thanks again 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.