2017 © Pedro Peláez
 

library mandrill

Mandrill API library with Message class implementation like in Nette framework

image

fabian/mandrill

Mandrill API library with Message class implementation like in Nette framework

  • Friday, June 8, 2018
  • by fabiancz
  • Repository
  • 3 Watchers
  • 6 Stars
  • 2,028 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 8 Versions
  • 20 % Grown

The README.md

Mandrill API library with Message class implementation like in Nette framework., (*1)

Requirements

Installation

The best way to install is using Composer:, (*2)

$ composer require fabian/mandrill

If you'r using older Nette with Nette\Mail version <=2.3.0, you have to use mandrill-nette version 1.1.0:, (*3)

$ composer require fabian/mandrill:1.1.0

Usage

Add Mandrill API key to your parameters in your config.neon:, (*4)

parameters:
  mandrill:
    apiKey: yourApiKey

Then you can use MandrillMailer:, (*5)

$mail = new \Fabian\Mandrill\Message();
$mail->addTo('joe@example.com', 'John Doe')
   ->setSubject('First email')
   ->setBody("Hi,\n\nthis is first email using Mandrill.")
   ->setFrom('noreplay@yourdomain.com', 'Your Name')
   ->addTag('test-emails');
$mailer = new \Fabian\Mandrill\MandrillMailer(
    $this->context->parameters['mandrill']['apiKey']
);
$mailer->send($mail);

You can use \Nette\Mail\Message too:, (*6)

$mail = new \Nette\Mail\Message;
$mail->addTo('joe@example.com', 'John Doe')
   ->setSubject('First email')
   ->setBody("Hi,\n\nthis is first email using Mandrill.")
   ->setFrom('noreplay@yourdomain.com', 'Your Name')
$mailer = new \Fabian\Mandrill\MandrillMailer(
    $this->context->parameters['mandrill']['apiKey']
);
$mailer->send($mail);

Mandrill templates

If you'r using templates, you can send email using sendTemplate() instead of send():, (*7)

$mailer->sendTemplate($mail, 'template_name', array(
    array('name' => 'header', 'content' => 'testing header'),
));

The Versions

08/06 2018

dev-master

9999999-dev

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

08/06 2018

v2.0.1

2.0.1.0

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

18/05 2016

v2.0.0

2.0.0.0

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

17/05 2016

v1.1.0.x-dev

1.1.0.9999999-dev

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

17/05 2016

v1.1.0

1.1.0.0

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

17/05 2016

v1.0.0.x-dev

1.0.0.9999999-dev

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

17/05 2016

v1.0.0

1.0.0.0

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette

04/08 2015

dev-pr/3

dev-pr/3

Mandrill API library with Message class implementation like in Nette framework

  Sources   Download

MIT

The Requires

 

api email nette