Andrey Posted June 28, 2012 Share Posted June 28, 2012 Please help me! I want to send an email to clients from the my hook. Where I have to specify the email address of the client? what is the id? <?php # Set Vars $command = 'SendEmail'; $values = array( 'messagename' => 'Test Template', 'id' => '1', ); $adminuser = 'DemoAdmin'; # Call API $results = localAPI($command,$values,$adminuser); if ($results['result']!="success") echo "An Error Occurred: ".$results['result']; ?> 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted June 28, 2012 Share Posted June 28, 2012 You cannot send emails to email addresses with the sendemail api. you can only send emails to existing clients using their client ID. The ID expected in the values array is this client id. 0 Quote Link to comment Share on other sites More sharing options...
Andrey Posted June 28, 2012 Author Share Posted June 28, 2012 (edited) Do I understand correctly ID it is a client ID in the system What other values should be in the array? From mail template? or other? I need to send messages to customers. Edited June 28, 2012 by Andrey 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted June 28, 2012 Share Posted June 28, 2012 Yes, the id would be the client ID or service ID. http://docs.whmcs.com/API:Send_Email 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.