Statistics
19
1
0
1.6y
Badges
Dependencies

lookyman/Mandrill

Send emails via Mandrill in Nette Framework.

Build Status Downloads Latest stable Code Climate

Requirements

lookyman/Mandrill requires PHP 5.5 or higher.

Installation

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

Configuration

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.

The 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.

Usage

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('sender@example.org')
	->addTo('recipient@example.org');
	->setText('Hello!');

$this->mandrill->send($message);

Homepage https://lookyman.net and repository https://github.com/lookyman/mandrill.

  • v1.0.0 Released version 1.0.0

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com