Title: PHP Error when trying to send email
Last modified: July 1, 2020

---

# PHP Error when trying to send email

 *  Resolved [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/)
 * Hi there,
 * We are experiencing this error:
 * `NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined method
   Google_Client::setIncludeGrantedScopes() in /var/www/html/<my-site-here>/wp-content/
   plugins/wp-mail-smtp/src/Providers/Gmail/Auth.php:88`
 * We are using the last (2.1.1) version of your plugin.
 * I tried recreating the credentials on Google Developer Platform and set them 
   up in the plugin settings, but the issue remains. The settings page shows this
   at the bottom (**authorization**)
 * `Fatal error: Uncaught Error: Call to undefined method Google_Client::setIncludeGrantedScopes()
   in /var/www/html/<my-site-here>/wp-content/plugins/wp-mail-smtp/src/Providers/
   Gmail/Auth.php:88 Stack trace: #0 /var/www/html/<my-site-here>/wp-content/plugins/
   wp-mail-smtp/src/Providers/Gmail/Auth.php(37): WPMailSMTP\Providers\Gmail\Auth-
   >get_client() #1 /var/www/html/<my-site-here>/wp-content/plugins/wp-mail-smtp/
   src/Providers/Gmail/Options.php(151): WPMailSMTP\Providers\Gmail\Auth->__construct()#
   2 /var/www/html/<my-site-here>/wp-content/plugins/wp-mail-smtp/src/Providers/
   Gmail/Options.php(134): WPMailSMTP\Providers\Gmail\Options->display_auth_setting_action()#
   3 /var/www/html/<my-site-here>/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/
   SettingsTab.php(288): WPMailSMTP\Providers\Gmail\Options->display_options() #
   4 /var/www/html/<my-site-here>/wp-content/plugins/wp-mail-smtp/src/Admin/Area.
   php(614): WPMailSMTP\Admin\Pages\SettingsTab->display() #5 /var/www/html/<my-
   site-here>/wp-content/plu in /var/www/html/<my-site-here>/wp-content/plugins/
   wp-mail-smtp/src/Providers/Gmail/Auth.php on line 88`

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13058509)
 * We are using php-fpm 7.2 under nginx 1.17
 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13058573)
 * And, something important. The SAVE SETTINGS button doesn’t exist anymore. It 
   doesn’t show at the bottom of the page, so even if I try to change any settings
   here, they get lost.
 *  Plugin Author [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * (@capuderg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13059404)
 * Hi [@richacinas](https://wordpress.org/support/users/richacinas/),
 * are you configuring the plugin for the first time? Or did you already have it
   installed and this started happening after the plugin update?
 * I think this could be a plugin conflict.
 * Maybe some other plugin is including an older version of the Google API library
   and causing the issue that you are experiencing.
 * Are you using some other plugin that is offering Google integration via API?
 * Could you please list all plugins that you are using and we can check for conflicts.
 * You could if possible, deactivate all plugins except for ours and see if that
   resolves the issue and then activate one at the time and see which one is causing
   it. Of course, this might not be possible for your production site, since it 
   depends on many plugins in order to function properly.
 * Take care!
 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13059524)
 * It was working perfectly until this morning.
 * There hasn’t been a new plugin installed recently. The only one I installed recently
   is another SMTP plugin with gmail and oauth integration so we could keep the 
   service up, and it works well.
 * I will let you know if I’m able to to the test that you are suggesting. Thanks
   so much
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13099128)
 * Hi [@richacinas](https://wordpress.org/support/users/richacinas/) – We haven’t
   heard from you in about a week, so I’m going to go ahead and mark this ticket
   resolved. If you still have questions, though, please feel welcome to continue
   the conversation.
 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13099149)
 * Hi [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/)
 * I understand. As you can guess, time hasn’t been on my side for this issue. I
   suspect a lot from certain plugin, and as soon as I can try to deactivate it (
   and others), i will let you know if it got solved.
 * Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP Error when trying to send email’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

## Tags

 * [client](https://wordpress.org/support/topic-tag/client/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 6 replies
 * 3 participants
 * Last reply from: [richacinas](https://wordpress.org/support/users/richacinas/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/php-error-when-trying-to-send-email/#post-13099149)
 * Status: resolved