yrochon Posted August 11, 2011 Share Posted August 11, 2011 Let me get this straight; from the doc : This command is used to send an email to a customer. The id you pass depends on what you want to send. For example if you are requesting the system to send a product related email template, you need to pass the Service ID it should relate to in the id field, while if you are requesting an invoice related email template to be sent, you would pass the Invoice ID, etc... Attributes messagename - unique name of the email template to send from WHMCS id - related ID number to send message for Example Command $postfields["action"] = "sendemail"; $postfields["messagename"] = "Hosting Account Welcome Email"; $postfields["id"] = "1"; ... is $postfields["id"] always the client id? If not, what is it, and to whom the message will be sent to? 0 Quote Link to comment Share on other sites More sharing options...
yrochon Posted August 11, 2011 Author Share Posted August 11, 2011 And I have another question; We need to create message templates for a custom module and we notice that messages may contain Smarty syntax. Is it possible to send data through the API call that can be treated by the message template and processed? For example, have the message template display a message like You may call at {$phone_number} and speak with {$representative_name} for more information and invoke this with $postfields["action"] = "sendemail"; $postfields["messagename"] = "My Custom Email Template"; $postfields["id"] = "1"; $postfields['phone_number] = '111-222-3333'; $postfields['representative_name'] = 'Jon Doe'; 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.