• Resolved dberdal

    (@dberdal)


    I am using the “Force From Email” setting which is working for general email sent from WordPress, and also notifications from Wordfence.
    Test messages sent from within the plugin work correctly.

    However, the forced email is not being respected by Gravity Forms and WooCommerce

    I am using wordpress multisite 5.5.1 and Version 2.3.1 of wp-mail-smtp

    I’m happy to provide any further info that may be helpful

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @dberdal,

    Thanks for reaching out. I’ve tested the ‘Force From Email’ option with WooCommerce emails and the From Email is as expected. If you have a different “From” address in WooCommerce(or other plugins) than the one in WP Mail SMTP and ‘Force From Email’ is enabled, the email in the “From” address field of WooCommerce (or other plugins) will be added to the reply-to header while the From Email should still be the one used in WP Mail SMTP.

    The From Email might have been forced from elsewhere. If possible, could you please share the screenshot of the WooCommerce Emails section, WP Mail SMTP section, and the original message of the email?

    Thanks!

    Thread Starter dberdal

    (@dberdal)

    Hi Sanjeev,

    Thank you for following up –

    Here is a screenshot of the WooCommerce email sender settings
    https://snipboard.io/U76CrX.jpg

    Screenshot of the SMPTP Email Settings
    https://snipboard.io/uECsyc.jpg

    Snapshot of Email Header Sent by WooCommerce (not working correctly)

    https://snipboard.io/PShwAC.jpg

    Snapshot of Email Header sent by WordPress (working correctly)
    https://snipboard.io/ZlsxdR.jpg

    Snapshot of Email Header sent as the test message from SMTP plugin
    https://snipboard.io/stVJv6.jpg

    I am using wordpress multisite and using the wp-config.php defines to set the SMTP email defaults. The correct settings show in the SMTP email UI, and they are correctly being used by WordPress and Wordfence…

    I did find the following error in my WordPress Debug… not sure if it’s at all related
    PHP Warning: A non-numeric value encountered in /home/wordpress/wellcoachedmarketing/public_html/wp-content/plugins/wp-mail-smtp/src/Processor.php on line 215

    Let me know if there is anything else I can send

    Hi @dberdal,

    Thanks for the details with screenshots. It looks like you’ve used the value of constant for Force From Email incorrectly. The PHP warning probably indicates that the string value is used. Please make sure, you’re using:

    define( 'WPMS_MAIL_FROM_FORCE', true );

    and not,

    define( 'WPMS_MAIL_FROM_FORCE', 'true' );

    Also, make sure you’re using the constants above the line that reads:

    /* That's all, stop editing! Happy publishing. */

    I hope this helps!

    Thread Starter dberdal

    (@dberdal)

    Oh man thank you! I should have noticed that. Removing quotes from the true and false defines solved that. I thought they were copy pasted from a previous working setup.

    For any future people wondering, here are the working defines. I have a few commented out that I am not currently using

    
    define('WPMS_ON', true);
    //define( 'WPMS_DO_NOT_SEND', true );
    define('WPMS_MAILER', 'smtp' );
    define('WPMS_SMTP_PASS', '**********');
    define('WPMS_SMTP_USER', 'postmaster@mail.**********.com');
    define('WPMS_SMTP_HOST', 'smtp.mailgun.org');
    define('WPMS_SMTP_PORT', '587');
    define('WPMS_SMTP_AUTH', true);
    define('WPMS_MAIL_FROM', 'noreply@*****');
    define('WPMS_SET_RETURN_PATH', false); // Sets $phpmailer->Sender if true
    define('WPMS_SSL', 'tls'); // Possible values '', 'ssl', 'tls' - note TLS is not STARTTLS
    //define('WPMS_MAIL_FROM_NAME', 'My WordPress Multisite');
    define('WPMS_MAIL_FROM_FORCE', true); //force all sites to use sending address defined above

    Thanks for the helpful support!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Force From Email” not working with some plugins’ is closed to new replies.