Categories
PHP

Elasticemail Class

I like a lot how works Elasticemail.com , perfect to send emails using an external provider with tracking and really good price.

I did an small class to easily send email using their system with PHP.

Usage example:

require_once 'elasticemail.php';

//creating the conection to elasticemail
$elasticEmail = new ElasticEmail('yourelasticemail@example.es','APIKEYHERE');

//sending the email
var_dump($elasticEmail->sendMail('from@gmail.com','from name',
										'to@gmail.com','test subject'.time(),'html body'));

Quite simple and really useful.

Download the class here.