PHP code example of christianklisch / newsletter2go-api-php
1. Go to this page and download the library: Download christianklisch/newsletter2go-api-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
christianklisch / newsletter2go-api-php example snippets
// init with api-key
$api = new \Newsletter2Go\Newsletter2GoService('1234567890abcdef');
$api->setDebug(0);
$api->setDefaultopentracking(0);
$api->setDefaultlinktracking(0);
$email = new \Newsletter2Go\Email();
$email->setTo('[email protected]');
$email->setFrom('[email protected]');
$email->setSubject('Hello-Subject');
$email->setText('Hello my friend');
$email->setReply('[email protected]');
$res = $api->sendSingleMail($email);