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,'marif252@gmail.com','arif.liaqat@yahoo.com', '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,"Test@test.com","~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.