Skip to content

Disable SparkPost mailer using a PHP constant #149

@mathieuhays

Description

@mathieuhays

I'm running the SparkPost plugin on a website I'm developping locally and then deploy to a production environment. My development environment include an email catcher that prevent emails to be sent by accident to the members of that website. My issue is that SparkPost bypasses that email catcher, probably due to the fact that the plugin is using HTTP instead of SMTP.

I usually disable the plugin locally but I do forget from time to time (when copying the production database locally to debug issues).

One solution would be to add a constant I can set on my local config that disables Sparkpost's mailer and fallbacks to WordPress' one.

example:

<?php // local-config.php

define('WPSP_DISABLE_MAILER', true);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions