Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emails not sending on M2.3.3 due to backward-incompatible changes #6

Closed
jaxtheking opened this issue Oct 9, 2019 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@jaxtheking
Copy link

This may strengthens the case I made here (#5) for the need of a Send Test Email function...
M2.3.3 introduced a backward-incompatible change by introducing the new EmailMessageInterface. You can read the relevant bit of the release notes here:

Therefore, the sending of emails in M2.3.3 results in the following error:
Fatal error: Uncaught TypeError: Argument 1 passed to Ebizmarts\MandrillSmtp\Model\Transport\Smtp::sendMessage() must implement interface Magento\Framework\Mail\MessageInterface, instance of Magento\Framework\Mail\EmailMessage given, called in /vendor/ebizmarts/magento2-mandrillsmtp/Plugin/Mail/TransportPlugin.php on line 42 and defined in /vendor/ebizmarts/magento2-mandrillsmtp/Model/Transport/Smtp.php:48

Stack trace:
#0 /vendor/ebizmarts/magento2-mandrillsmtp/Plugin/Mail/TransportPlugin.php(42): Ebizmarts\MandrillSmtp\Model\Transport\Smtp->sendMessage(Object(Magento\Framework\Mail\EmailMessage))

#1 /vendor/magento/framework/Interception/Interceptor.php(135): Ebizmarts\MandrillSmtp\Plugin\Mail\TransportPlugin->aroundSendMessage(Object(Magento\Email\Model\Transport\Interceptor), Object(Closure))

#2 /dev/vendor/magento/module-email/Model/Mail/TransportInterfacePlugin.php(48): Mag in /dev/vendor/ebizmarts/magento2-mandrillsmtp/Model/Transport/Smtp.php on line 48

To fix it, we just need to change all MessageInterface references (only 3) to EmailMessageInterface in /vendor/ebizmarts/magento2-mandrillsmtp/Model/Transport/Smtp.php, with no further changes needed.

I hope this helps.
Regards,
Luca

gonzaloebiz added a commit that referenced this issue Oct 9, 2019
@gonzaloebiz
Copy link
Collaborator

Thanks @jaxtheking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants