dreadiscool Posted August 17, 2014 Share Posted August 17, 2014 Hello everyone, I've been writing a server module, and I'm stuck on one part, using the localAPI to send an automated email. This is the code in question $values["customtype"] = "general"; $values["id"] = $params["clientsdetails"]["id"]; $values["customsubject"] = "<email subject>"; $values["custommessage"] = "<email message>"; localAPI("sendmail", $values, "1"); I have tried running localAPI with my admin username and my admin id (1, as shown above). However, using both of those results in the error 'No matching admin user found'. Is there something specific I have to enable to allow my admin account to be used for API accesss? Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
TekStorm Inc - James Posted August 17, 2014 Share Posted August 17, 2014 (edited) Use the username of the admin for your API call. Example: $results = localAPI( 'sendemail', array( 'custommessage' => '<nowiki><p>Thank you for choosing us</p> <p>Your custom is appreciated</p></nowiki>', 'customsubject' =>'Demo Client Email', 'customtype' => 'general', 'id' => '1' ), 'someAdminUsernameHere' ); Also, their administrator role group would need API Access permission. Have a look here. Edited August 17, 2014 by TekStorm Inc - James 0 Quote Link to comment Share on other sites More sharing options...
lauer Posted January 19, 2015 Share Posted January 19, 2015 I have same problem! 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.