• 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://www.ads-software.com/plugins/wpmandrill/

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