2017 © Pedro Peláez
 

library lib-mail-mandrill

Mandrill implementation for the mail library of the Ride framework

image

ride/lib-mail-mandrill

Mandrill implementation for the mail library of the Ride framework

  • Thursday, October 13, 2016
  • by ride-user
  • Repository
  • 7 Watchers
  • 0 Stars
  • 2,908 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

Ride: Mail Library (Mandrill)

Mandrill implementation for the mail library of the PHP Ride framework., (*1)

For more information, you can check the Mandrill website., (*2)

What's In This Library

MandrillTransport

The MandrillTransport class implements the Transport interface. It uses the Mandrill rest API to send mails. You can set tags and the subaccount for all mails sent by the transport., (*3)

MandrillMailMessage

The MandrillMessage class extends the MailMessage class. You can set tags and the subaccount for a mail message individually., (*4)

Code Sample

<?php

use ride\library\log\Log;
use ride\library\mail\transport\MandrillTransport;

function createTransport($apiKey, Log $log) {
    $transport = new MandrillTransport($apiKey, $log);

    // a tag and subaccount to be set on all mails which don't set tags or a subaccount
    $transport->addTag('newsletter');
    $transport->setSubAccount('my-subaccount');

    return $transport;
}

function sendMail(MandrillTransport $transport) {
    // like any mail message
    $message = $transport->createMessage();
    $message->setSubject('My subject');
    $message->setRecipient('to@domain.com');
    $message->addCc('To 2 <to2@domain.com>');
    $message->addBcc(array('to3@domain.com', 'To 3 <to3@domain.com>'));
    $message->setIsHtmlMessage(true);
    $message->setMessage('<html><body>

..., (*5)

</body></html>'); // mandrill extension, override the transport tags and subaccount $message->addTag('registration'); $message->setSubAccount('my-other-subaccount'); // send it try { $transport->send($message); } catch (MailException $exception) { } }

Installation

You can use Composer to install this library., (*6)

composer require ride/lib-mail-mandrill

The Versions

13/10 2016

dev-master

9999999-dev

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

13/10 2016

dev-develop

dev-develop

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

13/10 2016

1.0.0

1.0.0.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

24/05 2016

0.5.1

0.5.1.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

26/04 2016

0.5.0

0.5.0.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

29/01 2016

0.4.1

0.4.1.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

03/06 2015

0.4.0

0.4.0.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

28/05 2015

0.3.0

0.3.0.0

Mandrill implementation for the mail library of the Ride framework

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd