Question

i want to send an email through infusionsoft api but email not shown i want to try but no email sent,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...";
 }

  $myApp->sendEmail('conList','marif252@gmail.com','arif.liaqat@yahoo.com', 'ccAddresses', 'bccAddresses', 'contentType', 'subject', 'htmlBody', 'txtBody');

 ?>
Was it helpful?

Solution

maybe config your smtp server on php.ini

or you can install smtp server on your system

OTHER TIPS

//Connect to the php SDK https://github.com/infusionsoft/PHP-iSDK
require_once($_SERVER['DOCUMENT_ROOT'] . '/src/isdk.php'); $app = new iSDK();


//Set your connection, make sure you have the api key entered correctly
$app->cfgCon("applicationName", "APIKEYGOESHERE");


//Next you have to query Infusionsoft for the contact ids for your list of email address:
$email = 'target.recipient@example.com';
$returnFields = array('Id');
$contact = $app->findByEmail($email, $returnFields);


//We need an array of the contact Ids to send email
$clist = array_values($contact[0]);


//Then you can send an email:
$status = $app->sendEmail($clist,"sender@email.com","~Contact.Email~", "","","Multipart","The subject line of this email","The HTML content the body of this email.","The content of the plain text body of this email.");


//https://developer.infusionsoft.com/docs/read/Email_Service#sendEmail

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top