• Resolved Alex R

    (@apollolux)


    Hello! I’ve just tried this check email plugin on a WP I admin and found out that setting the from email to the site’s wp_mail_from email works while having the from email set to something not on the same domain will fail. I have modified my site’s copy of Check Email to default to the wp_mail_from and then set it to either the current user email or the custom from email field if that’s missing.

    For reference, directly from the wp_mail() function (starting line 345) the following code can be copied to get the default from email and name, even if it’s set via theme’s functions.php or another plugin:

    
    $from_email = apply_filters( 'wp_mail_from', $from_email );
    // ...
    $from_name = apply_filters( 'wp_mail_from_name', $from_name );
    

    I changed the checkemail() and checkemail_send() functions on mine to accommodate this.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding wp_mail_from as default from addr support?’ is closed to new replies.