• Resolved Grzegorz.Janoszka

    (@grzegorzjanoszka)


    Since I have upgraded to WP 4.6 I see following cron errors:

    PHP Fatal error: Uncaught phpmailerException: Invalid address: wordpress@ in /var/www/site/wp-includes/class-phpmailer.php:946
    Stack trace:
    #0 /var/www/site/wp-includes/pluggable.php(352): PHPMailer->setFrom(‘wordpress@’, ‘WordPress’)
    #1 /var/www/site/wp-content/plugins/gtmetrix-for-wordpress/gtmetrix-for-wordpress.php(269): wp_mail(‘user@domain…’, ‘GTmetrix for Wo…’, ‘<table width=”1…’)
    #2 /var/www/site/wp-includes/plugin.php(600): GTmetrix_For_WordPress->scheduled_events(‘daily’)
    #3 /var/www/site/wp-cron.php(117): do_action_ref_array(‘gfw_daily_event’, Array)
    #4 {main}
    thrown in /var/www/site/wp-includes/class-phpmailer.php on line 946

    Any idea when that plugin could be updated to PHP 7.0 and WP 4.6?

    https://wordpress.org/plugins/gtmetrix-for-wordpress/

Viewing 8 replies - 1 through 8 (of 8 total)
  • I saw same error in my WordPress.
    I solved by these code in my functions.php

    add_filter( 'wp_mail_from', function() {
        return 'wordpress@[MyDomain]';
    } );

    see https://github.com/Automattic/vip-quickstart/issues/512#issue-165799484

    It’s maybe related to web server settings.

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Right, it is not gtmetrics bug. Thanks for pointing me the solution.

    Nevertheless the plugin is quite old and an update would be needed.

    thanks for the codes @ functions.php .. it works

    I had this problem too. I think you will find it’s triggered by the server_name being set incorrectly, or generically. If you make sure it is explicitly specified, the problem should go away. This also applies to proxies, so make sure the proxy isn’t processing every domain by default.

    Hi we are seeing multiple errors with a similar header and expect this to also be an issue with phpmailer

    Fatal error: Uncaught exception ‘phpmailerException’ with message ‘Invalid address: (setFrom) ____@https://____.com

    we have recently changed our site over to https and note that if we revert back to http we don’t have the error. Any idea’s?

    I just changed to HTTPS today and voila, I have this error. It happens to me when I update a user’s account, like resetting a user’s password. Going to try the functions code above shortly.

    saramiddleton

    (@saramiddleton)

    Hi can someone help I am new to this forum and not sure if I am putting this into the right place – on my website the contact us box is throwing up this error and not notification email is coming through can someone help?

    Fatal error: Uncaught exception ‘phpmailerException’ with message ‘Invalid address: (setFrom) Mattygno1@Gmail.comrnReply-To: Mattygno1@Gmail.comrn’ in /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-includes/class-phpmailer.php:1023 Stack trace: #0 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-includes/pluggable.php(352): PHPMailer->setFrom(‘Mattygno1@Gmail…’, ‘WordPress’, false) #1 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-content/themes/towersupply/functions.php(399): wp_mail(‘info@towersuppl…’, ‘Someone sent a …’, ‘TESTING 123?Nam…’, ‘From: Mattygno1…’) #2 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-settings.php(425): include(‘/www/sites/ca2/…’) #3 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-config.php(93): require_once(‘/www/sites/ca2/…’) #4 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-load.php(37): require_once(‘/www/sites/ca2/…’) #5 /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-blog-header.php(13): require_once(‘/www/sites/ca2/…’) #6 /www/sites/ca2/e90/www.towersupply.co.uk/we in /www/sites/ca2/e90/www.towersupply.co.uk/web/wp-includes/class-phpmailer.php on line 1023

    Hi,

    I have the same error. I tried the below code in my site :

    add_filter( ‘wp_mail_from’, function() {
    return ‘wordpress@[MyDomain]’;
    } );

    But it is not working.

    Please help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP 4.6 issues’ is closed to new replies.