Title: Missing parameters
Last modified: February 21, 2017

---

# Missing parameters

 *  [fabscanta](https://wordpress.org/support/users/fabscanta/)
 * (@fabscanta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/)
 * Hi,
 * When using a Enterprise Sparkpost subscription, wee need to set the return_path.
   See the Sparkpost message:
 * >  return_path string SparkPost Enterprise API only: email to use for envelope
   > FROM required for email transmissions To support Variable Envelope Return Path(
   > VERP), this field can also optionally be specified inside of the address object
   > of a specific recipient in order to give the recipient a unique envelope MAIL
   > FROM.
 * In addition, I also need to set the endpoint: [https://developers.sparkpost.com/api/](https://developers.sparkpost.com/api/).
   However, this endpoint is fixed in the current code.
 * Unfortunately, the only option I have is to edit the plugin code directly which
   is not suitable for support and updates.
 * Would is be possible to have, in the plugin parameters the following options?
   *
   API Endpoint (required for an Enterprise subscription) * Return-path (required
   for an Enterprise subscription) * Campaign ID (ideal for tracking campaign) *
   ip_pool (ideal for setting an IP pool)
 * Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [rajuru](https://wordpress.org/support/users/rajuru/)
 * (@rajuru)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8830884)
 * You should be able to solve all of these problem using one or more hook(s).
 * [https://github.com/SparkPost/wordpress-sparkpost/blob/master/docs/hooks.md](https://github.com/SparkPost/wordpress-sparkpost/blob/master/docs/hooks.md)
 *  Thread Starter [fabscanta](https://wordpress.org/support/users/fabscanta/)
 * (@fabscanta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8835529)
 * Hi rajuru,
 * It sounds probably obvious for you, but it is not for me.
    My objective is to
   improve the setting page to allow the site administrator to set the parameters(
   Endpoint, Return-Path, Campaign ID, IP Pool). I don’t see how to do that thanks
   to the hooks. Could you provide one or more example, please?
 * Thank you
    -  This reply was modified 9 years, 1 month ago by [fabscanta](https://wordpress.org/support/users/fabscanta/).
 *  Plugin Contributor [rajuru](https://wordpress.org/support/users/rajuru/)
 * (@rajuru)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8836019)
 * Thanks for your specific suggestions. However, settings page is for most generic
   use cases. Having those extra fields in the settings page may even confuse the
   non-enterprise users. However, if we see a growing demand for this, we can surely
   consider that.
 * You can see [this buddyfix example](https://github.com/SparkPost/wordpress-sparkpost/blob/master/docs/buddypress-fix.md)
   how to use a hook.
 * In the same way, you can use any of the appropriate hook listed in the previous
   link. For example, you can customize the whole payload (data sent to sparkpost),
   using **wpsp_request_body** hook.
 *     ```
       add_filter('wpsp_request_body', function($body){
           //you can modify anything in $body here
       });
       ```
   
 * you can customize the payload as [transmission api](https://developers.sparkpost.com/api/transmissions.html)
   supports.
 * and to modify the endpoint, you can use
 *     ```
       add_action('wpsp_init_mailer', function($obj) {
         $obj->endpoint = 'YOUR_API_ENDPOINT_HERE';
       });
       ```
   
    -  This reply was modified 9 years, 1 month ago by [rajuru](https://wordpress.org/support/users/rajuru/).
    -  This reply was modified 9 years, 1 month ago by [rajuru](https://wordpress.org/support/users/rajuru/).
    -  This reply was modified 9 years, 1 month ago by [rajuru](https://wordpress.org/support/users/rajuru/).
 *  Thread Starter [fabscanta](https://wordpress.org/support/users/fabscanta/)
 * (@fabscanta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8836476)
 * I think this is more valuable for the plugin to support Enterprise users.
 * I tried your suggestion for the endpoint. I get a fatal error because $obj->endpoint
   is protected.
    `Error: Cannot access protected property WPSparkPost\SparkPostHTTPMailer::
   $endpoint`
 * We thought that there is a field to do a fork and a pull request where you could
   review the code and validate it.
 * Do you think your team could welcome this option as an opportunity of improvement?
 * Thank you
 *  Plugin Contributor [rajuru](https://wordpress.org/support/users/rajuru/)
 * (@rajuru)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8836563)
 * > Error: Cannot access protected property WPSparkPost\SparkPostHTTPMailer::$endpoint
 * Ah, that’s a super silly oversight! It must not be protected. I’ve just [logged a bug](https://github.com/SparkPost/wordpress-sparkpost/issues/104).
   We’ll fix it ASAP.
 * > Do you think your team could welcome this option as an opportunity of improvement?
 * Sure. We log all enhancement ideas. Please create an issue in [https://github.com/SparkPost/wordpress-sparkpost/issues](https://github.com/SparkPost/wordpress-sparkpost/issues).
   We’ll surely consider it based on demand.
 *  Thread Starter [fabscanta](https://wordpress.org/support/users/fabscanta/)
 * (@fabscanta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8838581)
 * Hi rajuru,
 * That’s great to read your feedback.
 * My colleague has made the pull request: [https://github.com/SparkPost/wordpress-sparkpost/pull/105](https://github.com/SparkPost/wordpress-sparkpost/pull/105)
 * Many thanks.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Missing parameters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sparkpost_763a21.svg)
 * [SparkPost](https://wordpress.org/plugins/sparkpost/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sparkpost/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sparkpost/)
 * [Active Topics](https://wordpress.org/support/plugin/sparkpost/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sparkpost/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sparkpost/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [fabscanta](https://wordpress.org/support/users/fabscanta/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/missing-parameters/#post-8838581)
 * Status: not resolved