<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); // generate HTML part of dynamic email message $htmlPart = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- If you delete this meta tag, Half Life 3 will never be released. --> <meta name="viewport" content="width=device-width" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>ZURBemails</title> <link rel="stylesheet" type="text/css" href="stylesheets/email.css" /> <style> /* ------------------------------------- GLOBAL ------------------------------------- */ * { margin:0; padding:0; } * { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; } img {
<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); $retval = $api->ping(); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to ping!\n"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Returned: " . $retval . "\n"; }
<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); $request = array('id' => 'message-id'); $retval = $api->messagesInfo($request); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load messagesInfo()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Success!\n"; echo "\temail:" . $retval['email'] . "\n"; echo "\tstatus:" . $retval['status'] . "\n"; echo "\tid:" . $retval['id'] . "\n"; echo "\ttimestamp:" . $retval['timestamp'] . "\n"; echo "\tsender:" . $retval['sender'] . "\n"; echo "\tsubject:" . $retval['subject'] . "\n"; }
<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); $request = array('email' => '*****@*****.**', 'comment' => 'Test'); $retval = $api->rejectsAdd($request); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load rejectsAdd()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Success!\n"; }
<?php include_once "LeaderSend/inc/Leadersend.php"; $LeaderSendApi = new Leadersend(); $request = array('subject' => 'test subbb', 'from' => array('name' => 'DineDesk', 'email' => '*****@*****.**'), 'signing_domain' => 'dinedesk.com', 'to' => array(array('name' => 'snehal', 'email' => '*****@*****.**')), 'html' => 'Hi there iteem reviewlds', 'auto_plain' => true, 'merge_vars' => array('*****@*****.**' => array(array('name' => 'FNAME', 'value' => 'Alex'), array('name' => 'LNAME', 'value' => 'Doubt')))); print_r($request); $retval = $LeaderSendApi->messagesSend($request); echo 'sdf';
<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); $request = array('email' => '*****@*****.**'); $retval = $api->rejectsDelete($request); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load rejectsDelete()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo $retval ? "Success!\n" : "Failed!\n"; }
<?php /** This Example shows how to ping using the Leadersend class and do some basic error checking. **/ require_once 'inc/Leadersend.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new Leadersend($apikey); $request = array('email' => '*****@*****.**', 'include_expired' => false); $retval = $api->rejectsList($request); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load rejectsList()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Success!\n"; foreach ($retval as $val) { echo $val['email'] . " " . $val['reason'] . "\n"; echo "\tdetail: " . $val['detail'] . "\n"; echo "\texpired: " . intval($val['expired']) . "\n"; } }