Search code examples
phpemailwampwampserverinfusionsoft

how to send email using infusionsoft api


I make a php page in which I used infusionsoft. When I run the function it returns 1 but no mail is sent to the mail address. I'm sending mail through wamp server in infusionsoft api. Here is my code:

 <?php
 echo "Hello World! <br/>";
 include_once('iSDK/src/isdk.php');
 //require_once"iSDK/src/isdk.php";
 $myApp = new iSDK;
 // Test Connnection
 if ($myApp->cfgCon("connectionName"))
 {
  echo "Connected...";
 }
 else
 {
  echo "Not Connected...";
 }

 $check=$myApp->sendEmail($clist,'[email protected]','[email protected]', 'ccAddresses', 'bccAddresses', 'contentType', 'subject', 'htmlBody', 'txtBody');
 print_r($check);
 ?>

Solution

  • To be able to send email through Infusionsoft you must first to add users to their system. Then You must get his ID and to connect to the system.

    echo "Hello World!";
     include_once('iSDK/src/isdk.php');
     $myApp = new iSDK;
     if ($myApp->cfgCon("connectionName"))
     {
      echo "Connected...";
     }
     else
     {
      echo "Not Connected...";
     }
    $clist=array(123,456,789)
    $check=$myApp->sendEmail($clist,"[email protected]","~Contact.Email~", "","","Text","Test Subject","","This is the body");
     print_r($check);
    

    Everything is on this link: sendEmail

    I think over Wamp will not work. For that I'm not sure because I use XAMPP and does not work.