示例#1
0
						<p>
							<a href="#">Terms</a> |
							<a href="#">Privacy</a> |
							<a href="#"><unsubscribe>Unsubscribe</unsubscribe></a>
						</p>
					</td>
				</tr>
			</table>
				</div><!-- /content -->
				
		</td>
		<td></td>
	</tr>
</table><!-- /FOOTER -->

</body>
</html>';
$request = array('subject' => 'A little bit of this, A little bit of that & a whole of Xmas', 'from' => array('name' => 'Roshni', 'email' => '*****@*****.**'), 'signing_domain' => 'dinedesk.com', 'to' => array(array('name' => 'Alex', 'email' => '*****@*****.**')), 'html' => $htmlPart, 'auto_plain' => true, 'merge_vars' => array('*****@*****.**' => array(array('name' => 'FNAME', 'value' => 'Alex'), array('name' => 'LNAME', 'value' => 'Doubt'))));
$retval = $api->messagesSend($request);
header("Content-Type: text/plain");
if ($api->errorCode) {
    echo "Unable to load messagesSend()!";
    echo "\tCode=" . $api->errorCode . "\n";
    echo "\tMsg=" . $api->errorMessage . "\n";
} else {
    echo "Success!\n";
    foreach ($retval as $val) {
        echo $val['email'] . " " . $val['status'] . "\n";
        echo "\tmessage-id:" . $val['id'] . "\n";
    }
}
示例#2
0
<?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';