dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
49 stars 63 forks source link

unable to use custom Mail Message class #522

Closed yaroslav-zenin closed 6 years ago

yaroslav-zenin commented 6 years ago

I've created own \Namespace\Mail\Message implement \Magento\Framework\Mail\MessageInterface but unable to use it because of signature

<?php

namespace Dotdigitalgroup\Email\Plugin;

class MessagePlugin
{
    public function afterSetBody(\Magento\Framework\Mail\Message $message, $body)
   {}

   // should be 
    public function afterSetBody(\Magento\Framework\Mail\MessageInterface $message, $body)
    {}
}

also it will be strictly required on Magento 2.3 because they didn't extends from \Zend\Mail anymore

simon-letch commented 6 years ago

Hi @yaroslav-zenin,

We have a fix to the method signature going through code review and UAT now.

Thanks, Simon

yaroslav-zenin commented 6 years ago

@simon-letch thanks look forward for the new release ;)

simon-letch commented 6 years ago

Hey @yaroslav-zenin,

As promised the fix for this is now live as of v3.0.2.

Thanks, Simon