- Issue created by @mnlund
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - 🇳🇴Norway mnlund
Here is a patch that skips this requirement if core version is 10.2 and above.
- 🇺🇸United States zengenuity
Does the new core functionality support attachments? I wouldn't want to say Easy Email works without one of the mailer modules if it doesn't work completely.
- First commit to issue fork.
- Merge request !25Issue #3412324: No need for mail plugin dependency after 10.2 → (Open) created by apaderno
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
about 1 year ago Waiting for branch to pass - Status changed to Needs work
about 1 year ago 6:09pm 24 January 2024 - 🇺🇸United States zengenuity
@apaderno and @mnlund: I just tested Easy Email with Core's implementation of Symfony Mailer, and it doesn't really seem to work. Core's plugin hard codes the emails to be sent as plain text. See these lines:
- https://git.drupalcode.org/project/drupal/-/blob/10.2.2/core/lib/Drupal/...
- https://git.drupalcode.org/project/drupal/-/blob/10.2.2/core/lib/Drupal/...
That being the case, Easy Email would only work if the emails you are sending are plain text only. Am I missing something? Have you configured your site in a different way that allows for HTML emails with Core's implementation of Symfony Mailer?
I realize you could use Easy Email to send plain text only emails, but I doubt that's the primary use case for most people. If we proceed with removing the error in hook_requirements, it must be replaced with a strongly-worded warning there telling people that it only works for plain text emails with no attachments, and that if they want to use HTML, they need one of the two mailer modules. If you add that in, I will merge this.
- 🇮🇹Italy apaderno Brescia, 🇮🇹
\Drupal\Core\Mail\Plugin\Mail\SymfonyMailer
is a plugin class used to send emails. That is different from the\Symfony\Component\Mailer\Mailer
class which is already required from Drupal core 10.2, and which does not need to be an extra requirement for this module. - 🇺🇸United States zengenuity
I understand that, but how are you sending emails from Easy Email through
\Symfony\Component\Mailer\Mailer
? This module doesn't integrate directly with that. Do you have another module that connects them? Currently, this module relies on the Drupal Core mail API to send all emails, so the only thing it can do it out of the box is go though\Drupal\Core\Mail\Plugin\Mail\SymfonyMailer
. - 🇮🇹Italy apaderno Brescia, 🇮🇹
I apologize: I installed all the modules as suggested, so HTML emails are sent when the used mail plugin is not the Drupal core one.
It is correct to say that this module requires either the Symfony Mailer module or the Symfony Mailer Lite module; it is not simply enhanced by one of those modules. Therefore, the change suggested in this issue is not correct.
Eventually, those modules should be changed to be compatible with Drupal 10.2.
- Status changed to Closed: works as designed
about 1 year ago 1:54pm 19 February 2024 - 🇳🇴Norway mnlund
Hi, and apologies for not following up on the issue I created. You are right that with the current implementation of Symfony Mailer in Core, we do not fulfill the requirements for EasyMail. However, going forward, it could be nice to achieve this without the need for extra modules. For now, this task could be closed.