Mandrill is a new way for apps to send transactional email. It runs on the delivery infrastructure that powers MailChimp.
Allows to send up to 12k free emails per month.
##Install
- Download and put
mandrill
directory intopackages
. - Load
email
&mandrill
packages inconfig/config.php
:
'always_load' => array(
'packages' => array(
'email',
'mandrill'
)
)
- Edit your
config/email.php
file to usemandrill
driver.
'driver' => 'mandrill'
- Copy
mandrill/config/mandrill.php
file toconfig/
and enter your Mandrill API key.
'api_key' => 'your_api_key'
##Usage As you would send any email through FuelPHP.
$email = Email::forge();
$email->from('my@email.me', 'My Name');
$email->to('receiver@elsewhere.co.uk', 'Johny Squid');
$email->subject('This is the subject');
$email->html_body(\View::forge('email/template', $email_data));
$email->send();
##Limitations
- Doesn't support attachments
- TO, CC & BCC are all merged (By default not exposed to "TO" field; Sends individually)
##Credits