I am using this API "https://github.com/infusionsoft/PHP-iSDK". I am calling it in a simple php file but I am having a error, I am new to php any body with some easy solution, here is my code.
<?php
echo "Hello World! <br/>";
include_once('iSDK/src/isdk.php');
$myApp = new iSDK;
if($myApp->cfgCon("connectionName")) {
echo "Connected...";
} else {
echo "Not Connected...";
}
sendEmail('conList','fromAddress','toAddress', 'ccAddresses', 'bccAddresses', 'contentType', 'subject', 'htmlBody', 'txtBody');
?>
This code below give this error :
Call to undefined function sendEmail() in C:\xampp\htdocs\test\email.php on line 16
Is this the only error in this code?
It looks like php can't find the function within iSDK.
The line nclude_once'iSDK/src/isdk.php';
should be include_once('iSDK/src/isdk.php');
and you should check, if the relative path is correct.
The first character in the next line is also missing: myApp = new iSDK;
should be $myApp = new iSDK();
Second guess is to write $myApp->sendEmail(
instead of sendEmail(