Jump to content

WHMCS API - Send Email Custom Predefined Email Template


kitivaruni

Recommended Posts

I got an error message "Email Template not found" when send email Custom created Predefined Email Template by localAPI??

 

Here my API coding:

 

$command = "sendemail";
$adminuser = "admin";
$values["customtype"] = "domain";
$values["customsubject"] = "Domain Overdue";    # <------   Custom Created Email Template
$values["customvars"] = base64_encode (   serialize ( array 'customvars'=>'aaa', 'customvars2'=>'bbb',) )   );
$values["id"] = 1;  # <------    Client Domain ID
$sendemail = localAPI ($command, $values, $adminuser);

Link to comment
Share on other sites

Looking at the docs, it appears you have to use the following to send a predefined email template, via the internal API:

 

$command = "sendemail";
$adminuser = "admin";
$values["messagename"] = "Hosting Account Welcome Email";  # <------ Custom Email Template
$values["id"] = "1";  # <------ Client ID

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

Link to comment
Share on other sites

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