simexis / elastic-email-web-api
Easily send emails with Elastic Email using Web API PHP Client https://elasticemail.com/
Installs: 1 050
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-10-11 14:44:28 UTC
README
This library allows you to quickly and easily use the Elastic Email Web API v2 via PHP.
Original clone from
Prerequisites
Instalation
composer require simexis/elastic-email-web-api
API
API documentation you can find on Elastic Email website.
Examples
Load account
$loader = require_once(__DIR__.'/../vendor/autoload.php');
$configuration = new \ElasticEmailClient\ApiConfiguration([
'apiUrl' => 'https://api.elasticemail.com/v2/',
'apiKey' => 'yourApiKey'
]);
$client = new \ElasticEmailClient\ElasticClient($configuration);
$clientData = $client->Account->Load();
Send email
$loader = require_once(__DIR__.'/../vendor/autoload.php');
$configuration = new \ElasticEmailClient\ApiConfiguration([
'apiUrl' => 'https://api.elasticemail.com/v2/',
'apiKey' => 'yourApiKey'
]);
$client = new \ElasticEmailClient\ElasticClient($configuration);
$client->Email->Send(
"from.example@bar.com",
"John Doe",
"sender.example@baz.com",
"Don John",
null,
null,
"reply.to@foo.com",
"ReplyTo Name",
"to@baf.com",
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"utf-8"
);
About
ElasticEmail.WebApiClient is guided and supported by the ElasticEmail Dev Team.
ElasticEmail.WebApiClient is maintained and funded by Elastic Email Inc. The names and logos for ElasticEmail.WebApiClient are trademarks of Elastic Email Inc.