Skip to content

Instantly share code, notes, and snippets.

@iMojtaba
Last active September 4, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMojtaba/367bf73fb4b385dc3fb754b40461bdc8 to your computer and use it in GitHub Desktop.
Save iMojtaba/367bf73fb4b385dc3fb754b40461bdc8 to your computer and use it in GitHub Desktop.
<?php
$subscribers = ['ssss@ddd.com', 'sdadsafsdfds@dff.com'];
$api_key = 'API_KEY';
try {
$configuration = new \ElasticEmailClient\ApiConfiguration( [
'apiUrl' => 'https://api.elasticemail.com/v2/',
'apiKey' => $api_key
] );
$client = new \ElasticEmailClient\ElasticClient( $configuration );
$add = $client->EEList->Add(
'List name',
false,
false,
null,
$subscribers,
false
);
var_dump($add);
} catch ( Exception $e ) {
// return $e->getMessage();
var_dump($e->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment