About WireMail: Mandrill

A WireMail implementation using the Mandrill HTTP API

Category Email/WireMail
Modules that work with email as well as modules that implement ProcessWire’s core WireMail type.
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Authorcraig-a-rodway
Module Version0.0.1
Class NameWireMailMandrill
Compatibility2.5, 2.6, 2.7
Date AddedMay 30, 2015
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/WireMailMandrill/
How to install or uninstall modules

README

WireMailMandrill

This module is an extension for the WireMail class to utilise the Mandrill HTTPS API.

It includes the official Mandrill PHP API client library.

Installation

  • Place module files inside /site/modules/WireMailMandrill/
  • Follow the standard ProcessWire module installation method (Admin, Modules, New, Refresh, Install)
  • Obtain a Mandrill API key from the logged in Settings page.
  • View the WireMailMandrill module configuration page and enter the API key.

Usage

All messaging functions throughout the site that use WireMail or wireMail() when this module is installed.

Example code

$mail = wireMail();

$mail->from('john.hammond@jurassicpark.com', 'John Hammond');
$mail->to('alan.grant@dinosaurfun.com', 'Alan Grant');
$mail->subject('The park is open');
$mail->bodyHTML($bodyHTML);

// Add an attachment
$mail->attachment($somePage->files->first()->filename);

$count = $mail->send();

Links

Changelog

v0.0.1 2015-05-30

  • Initial release, beta.

Licence

GPLv2