Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multisite #99

Open
rajumsys opened this issue Feb 9, 2017 · 5 comments
Open

Support multisite #99

rajumsys opened this issue Feb 9, 2017 · 5 comments

Comments

@rajumsys
Copy link
Contributor

rajumsys commented Feb 9, 2017

  • Each site can have their own configuration.
@bobwol
Copy link

bobwol commented May 2, 2017

I think activating the plugin and setting up an API for the entire network is better than inserting an API for each site on the network.

Or is it possible to have both configurations?

@landbryo
Copy link

I'd like the option to be able to set the API key up by adding a line in the wp-config.php or something similar so this can be used with multisite.

@johnlund
Copy link

Any updates on this?

@wp-networks
Copy link

+1

@bobwol
Copy link

bobwol commented May 28, 2018

Hey, I found a way to handle that:

  1. Add in wp-config.php (WordPress config file):

define('SPARKPOST_ENABLE',true);
define('SPARKPOST_API_KEY','yourapikey'); // change yourapikey to your Sparkpost API Key
define('SPARKPOST_FROM_NAME','Your Name'); // change YourName to your From Name
define('SPARKPOST_FROM_EMAIL','[email protected]'); // change [email protected] to your From Email

  1. in sparkpost.class.php (plugin file based on v3.2.0), update the method to:
    protected static $settings_default = array(
    'port' => 587,
    'sending_method' => 'api',
    'password' => SPARKPOST_API_KEY,
    'from_name' => SPARKPOST_FROM_NAME,
    'from_email' => SPARKPOST_FROM_EMAIL,
    'enable_sparkpost' => SPARKPOST_ENABLE,
    'enable_tracking' => true,
    'template' => '',
    'transactional' => false,
    'log_emails' => false,
    'location' => 'us'
    );

Caveats:

  • If you update the plugin, you will lost the changes on sparkpost.class.php, and have to do the step 2 again.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants