Title: Problem with legacy fallback
Last modified: August 31, 2016

---

# Problem with legacy fallback

 *  [Florian Ludwig](https://wordpress.org/support/users/fludwig-1/)
 * (@fludwig-1)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-legacy-fallback/)
 * Hi there!
 * There is a glitch in your function “wp_mail_native”
 * You should return the value that is returned by the required file.
 * So to be more specific:
 * WRONG Code!
 *     ```
       static function wp_mail_native( $to, $subject, $message, $headers = '', $attachments = array() ) {
         ...
         require plugin_dir_path( __FILE__ ) . '/legacy/function.wp_mail.php';
       }
       ```
   
 * Correct Code
 *     ```
       static function wp_mail_native( $to, $subject, $message, $headers = '', $attachments = array() ) {
         ...
         $status = require plugin_dir_path( __FILE__ ) . '/legacy/function.wp_mail.php';
         return $status;
       }
       ```
   
 * Otherwise we will always get NULL as return value for wp_mail if the native fallback
   is used!
 * [https://wordpress.org/plugins/wpmandrill/](https://wordpress.org/plugins/wpmandrill/)

The topic ‘Problem with legacy fallback’ is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [Florian Ludwig](https://wordpress.org/support/users/fludwig-1/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-legacy-fallback/)
 * Status: not resolved