Title: Error with wp_mail function
Last modified: August 20, 2016

---

# Error with wp_mail function

 *  [TimBHowe](https://wordpress.org/support/users/timbhowe/)
 * (@timbhowe)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-with-wp_mail-function/)
 * Hello,
    I love the plugin. It is a huge time saver but I’m getting an error.
 * `extract() expects parameter 1 to be array, null given in /wp-includes/pluggable.
   php on line 216`
 * This error occurs when gravity forms tries to send an email through the WordPress
   wp_mail function. This didn’t cause an issue with saving the form submission 
   just sending it. I deactivated the Root Relative URLs plugin resolved the issue
   but I do want to continue using the plugin.
 * To fix the issue and keep the plug in active I commented out the following on
   line 258 of sb_root_relative_urls.php
    `'wp_mail'` This also fixed the issue.
 * Sorry I can’t offer more help but I just wanted to alert you to the issue so 
   it can be fixed in future releases.
 * Thanks
    Tim
 * [http://wordpress.org/extend/plugins/root-relative-urls/](http://wordpress.org/extend/plugins/root-relative-urls/)

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

 *  [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/error-with-wp_mail-function/#post-3603288)
 * I just wanted to follow up to say ‘me too’. The hook ‘enable_content_massage’
   on ‘wp_mail’ turns the array passed to other functions filtering wp_mail to NULL,
   when it should include all of the info about the just-sent email. I haven’t delved
   into why this happens, but I’ve also had to remove the filter to make other plugins
   work.
 * Let me know if you have any questions!
 *  [Joshua Ray](https://wordpress.org/support/users/pdxollo/)
 * (@pdxollo)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/error-with-wp_mail-function/#post-3603292)
 * Had to make the above edit also to fix gravity forms submission issues.
 *  [tomas.kuba](https://wordpress.org/support/users/tomaskuba/)
 * (@tomaskuba)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/error-with-wp_mail-function/#post-3603295)
 * I had a similar problem with WP e-commerce plugin and have found the cause – 
   the funcion “enable_content_massage” is added as a filter and therefore it should
   return the passing argument but it does not.
 * Open sb_root_relative_urls.php, find this:
 *     ```
       static function enable_content_massage() {
               //this is only called when an external feed is being called
               //this lets the content filter know that we should convert root relative urls back in to absolute urls since
               //some external sources don't understand the html spec
               self::$massage = true;
   
               //massage global post object
               global $post;
               $post->post_content = self::massage_external_content($post->post_content);
               $post->post_excerpt= self::massage_external_content($post->post_excerpt);
           }
       ```
   
 * and change it to this:
 *     ```
       static function enable_content_massage($myarg) {
               //this is only called when an external feed is being called
               //this lets the content filter know that we should convert root relative urls back in to absolute urls since
               //some external sources don't understand the html spec
               self::$massage = true;
   
               //massage global post object
               global $post;
               $post->post_content = self::massage_external_content($post->post_content);
               $post->post_excerpt= self::massage_external_content($post->post_excerpt);
               return $myarg;
           }
       ```
   
 * i.e. add a $myarg argument to the function header and return it in the end. This
   should do the trick.

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

The topic ‘Error with wp_mail function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/root-relative-urls.svg)
 * [Root Relative URLs](https://wordpress.org/plugins/root-relative-urls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/root-relative-urls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/root-relative-urls/)
 * [Active Topics](https://wordpress.org/support/plugin/root-relative-urls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/root-relative-urls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/root-relative-urls/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [wp_mail](https://wordpress.org/support/topic-tag/wp_mail/)

 * 3 replies
 * 4 participants
 * Last reply from: [tomas.kuba](https://wordpress.org/support/users/tomaskuba/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/error-with-wp_mail-function/#post-3603295)
 * Status: not resolved