sonata-project / SonataNewsBundle

[Abandoned] Symfony SonataNewsBundle
https://docs.sonata-project.org/projects/SonataNewsBundle
MIT License
151 stars 131 forks source link

Allow to use "symfony/mailer" within `Mailer` #711

Closed wbloszyk closed 3 years ago

wbloszyk commented 3 years ago

Subject

Allow to use "symfony/mailer" within Mailer.

I am targeting this branch, because this change respects BC.

Changelog

### Added
- Support for "symfony/mailer" in `Sonata\NewsBundle\Mailer\Mailer`.
### Deprecated
- Support for "swiftmailer/swiftmailer" in `Sonata\NewsBundle\Mailer\Mailer`.
wbloszyk commented 3 years ago

The sendEmailMessage method doesn't work with a Mailer. There is no createMessage method https://github.com/symfony/mailer/blob/5.x/MailerInterface.php#L24

Fixed.

@VincentLanglet Do you know why test failing? I fix it several times but again forgot how to fix it.