Easy-to-use PHP library for sending emails with Mandrill.
composer require ataccama/mandrill
$mandrill = new Ataccama\MandrillMailer(API_KEY, SUB_ACCOUNT);
$mandrill
->addFrom('email@address.com', 'Name')
->addTo('email@address.com')
->setSubject('Email subject')
->templateName('tmp-name');
$mandrill->addAttributes([
'variable_key_1' => 'variable 1 content',
'variable_key_2' => 'variable 2 content'
]);
addAttachment("filename.txt", "file content")
$mandrill
->addFrom('email@address.com')
->addTo('email@address.com', 'Name')
->setSubject('Events confirmation')
->setHtmlBody('<h1>Love you</h1><p>Soo <strong>much</strong>!</p>');
$mandrill->send();