magepal / magento2-gmail-smtp-app

Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
https://www.magepal.com
319 stars 148 forks source link

Uncaught Error: Call to a member function setEncoding() on bool #166

Closed jamie-selesti closed 4 years ago

jamie-selesti commented 4 years ago

Magento version #:

Magento 2.3.3

Edition (EE, CE, OS, etc):

CE

Expected behavior:

To receive 2 emails

  1. Hello from MagePal SMTP (1 of 2)

  2. Hello from MagePal SMTP (2 of 2)

Actual behavior:

`PHP Fatal error: Uncaught Error: Call to a member function setEncoding() on bool in /var/www/vhosts/domain.com/vendor/magepal/magento2-gmailsmtpapp/Model/TwoDotThree/Smtp.php:83 Stack trace:

0 /var/www/vhosts/domain.com/vendor/magepal/magento2-gmailsmtpapp/Plugin/Mail/TransportPlugin.php(79): MagePal\GmailSmtpApp\Model\TwoDotThree\Smtp->sendSmtpMessage(Object(Zend\Mail\Message))

1 /var/www/vhosts/domain.com/vendor/magento/framework/Interception/Interceptor.php(135): MagePal\GmailSmtpApp\Plugin\Mail\TransportPlugin->aroundSendMessage(Object(Magento\Email\Model\Transport\Interceptor), Object(Closure))

2 /var/www/vhosts/domain.com/vendor/magento/module-email/Model/Mail/TransportInterfacePlugin.php(48): Magento\Email\Model\Transport\Interceptor->Magento\Framework\Interception{closure}()

3 /var/www/vhosts/domain.com/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Email\Model\Mail\TransportInterfacePlugin->aroundSendMessage(Object(Magento\Email\Model\Transport\Interceptor), Object(C in /var/www/vhosts/domain.com/vendor/magepal/magento2-gmailsmtpapp/Model/TwoDotThree/Smtp.php on line 83

`

Steps to reproduce:

Send test email using the built-in "Test Email Server Configuration Settings" functionality

Preconditions

Extension settings can be seen in the screenshot below image

woakley commented 4 years ago

A quick and lazy fix is to comment out line 83.

srenon commented 4 years ago

This issue should be fixed in 2.8.0 which will be released shortly

srenon commented 4 years ago

@jamie-selesti @woakley ... please download 2.8.0 and let me know if you are still having issues