2017 © Pedro Peláez
 

wordpress-muplugin sparkpost-wp-mail

wp_mail() drop-in for SparkPost

image

sanchothefat/sparkpost-wp-mail

wp_mail() drop-in for SparkPost

  • Thursday, June 2, 2016
  • by sanchothefat
  • Repository
  • 1 Watchers
  • 5 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SparkPost WP Mail Dropin

Dropin wp_mail() replacement for WordPress that uses the SparkPost.com API., (*1)

Heavily based on prior art by @danielbachhuber for Mandrill, (*2)

How to Use

To implement this drop-in, add it to your mu-plugins directory. In order for it to work, you must define your Mandrill API key. The easiest way to do this is to add it to your wp-config.php file like so:, (*3)

define( 'SPARKPOST_API_KEY', 'your-api-key' );, (*4)

If you've cloned this repo into your mu-plugins directory as the full folder (e.g. wp-content/mu-plugins/mandrill-wp-mail, you'll need to make sure you load the plugin files:, (*5)

<?php

require_once dirname( __FILE__ ) . '/sparkpost-wp-mail/sparkpost-wp-mail.php';

A Note About SparkPost

Sparkpost require sending domain verification via TXT records in your DNS or receiving an email at your domain., (*6)

For local development you can use their sandbox which allows up to 50 emails., (*7)

<?php

add_filter( 'wp_mail_from', function() {
    return 'wordpress@sparkpostbox.com';
} );

A Note About Composer

This plugin can be installed and managed using Composer; however, because of the way Composer and mu-plugins work, you'll need a bit of a workaround to make sure the plugin is loaded. For more information about how to use this drop-in with Composer, read this blog post by Richard Tape., (*8)

The Versions

02/06 2016

dev-master

9999999-dev https://github.com/sanchothefat/sparkpost-wp-mail

wp_mail() drop-in for SparkPost

  Sources   Download

GPL-2.0+

The Requires

 

wordpress