Send emails via Mandrill in Nette Framework.
lookyman/Mandrill requires PHP 5.5 or higher.
The best way to install lookyman/Mandrill is using Composer:
$ composer require lookyman/mandrill
You can enable the extension using your neon config:
extensions: mandrill: lookyman\Mandrill\DI\MandrillExtension
This extension creates new configuration section
mandrill, the default configuration looks like this:
mandrill: apiKey: '' format: 'json' endpointUrl: 'https://mandrillapp.com/api/1.0' debugger: off client: 
You can get your
apiKey at the Mandrill settings page.
client configuration option can pass additional settings to the default Guzzle client. For example, should you run into the
cURL error 60: SSL certificate problem: unable to get local issuer certificate error, you can use the
verify: off option here to disable peer certificate verification.
This extension provides you with the service
lookyman\Mandrill\Mandrill, that you can inject into your application and use it to send a message.
// $this->mandrill in an instance of lookyman\Mandrill\Mandrill $message = (new lookyman\Mandrill\Message\Message) ->setFromEmail('email@example.com') ->addTo('firstname.lastname@example.org'); ->setText('Hello!'); $this->mandrill->send($message);
v1.0.0 Released version 1.0.0