sendinblue / magento2-plugin

MIT License
6 stars 10 forks source link

Transport object not set when relay is disabled #10

Open adamkarnowka opened 4 years ago

adamkarnowka commented 4 years ago

Hi, please take a look at: https://github.com/sendinblue/magento2-plugin/blob/master/Model/Transport.php#L57

In case $relaySib is not enabled - nothing happens, $this->transport remains null, therefore sendMessage() will do literally nothing - as a result no single transactional e-mail in Magento can be sent.

As a fix, $this->transport = new Zend\Mail\Transport\Sendmail($parameters); can be added in constructor method to provide default fallback solution in case SMTP communication is disabled.

Kind regards, Adam