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

Document how to use symfony/mailer for email SMTP relay #844

Draft
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

mstenta
Copy link
Member

@mstenta mstenta commented May 8, 2024

This changes our https://farmos.org/hosting/email/ documentation to recommend using symfony/mailer for SMTP email relays, instead of the contrib SMTP module.

Kudos to @pcambra for turning me on to this new option! #837 (comment)

@mstenta mstenta marked this pull request as ready for review May 8, 2024 13:17
@mstenta mstenta mentioned this pull request May 8, 2024
@mstenta
Copy link
Member Author

mstenta commented May 9, 2024

I came across this core issue, which is harmless but causes errors to appear in Apache logs: https://www.drupal.org/project/drupal/issues/3420372

There's a patch available, but I don't think we need to include it in farmOS. Hopefully it will be fixed in core soon.

@mstenta
Copy link
Member Author

mstenta commented May 9, 2024

On second thought, it's easy enough for us to include a patch, and risk is very low because it only touches the SymfonyMailer.php file. This will prevent the errors for anyone using symfony/mailer, and its easier to do this here in farmOS as part of our new recommendation than for each downstream project to patch Drupal core themselves.

I pushed a second commit to add this patch.

@mstenta
Copy link
Member Author

mstenta commented May 9, 2024

@paul121 and I isolated another Drupal core issue with the SymfonyMailer class: https://www.drupal.org/project/drupal/issues/3446368

I'm going to look into providing a patch for it...

…xception when sending to multiple comma-separated addresses
@paul121
Copy link
Member

paul121 commented May 13, 2024

Seeing these various bugs come up and considering that Drupal core still doesn't consider symfony/mailer integration to be complete I find it hard to make it the official suggestion here... there definitely will be significant benefits once the Email API is somewhat re-designed but until then, is there anything particularly bad about the drupal/smtp module?

@mstenta
Copy link
Member Author

mstenta commented May 13, 2024

I tend to agree we should wait on this PR. In the meantime I will test it out in Farmier and help to debug issues. Hopefully these two obvious bugs will be fixed in core quick so no new Drupal core patches will ever be needed in farmOS.

Drupal core still doesn't consider symfony/mailer integration to be complete

That said, I think there's a difference between the "complete" integration as outlined in https://www.drupal.org/project/drupal/issues/1803948 and the simpler "SMTP relay" functionality that we currently recommend using the SMTP module for.

The change record (https://www.drupal.org/node/3369935) refers to the new SymfonyMailer plugin included with core as "experimental", so I'm not surprised there are still some bugs to work out. I'm optimistic that there won't be too many (the plugin itself is fairly simple), and we'll be able to recommend the SMTP relay capabilities long before the larger ambitions of refactoring Drupal's mail system happen.

@mstenta mstenta marked this pull request as draft May 17, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants