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

fix: Drupal - switch to sendmail transport always in settings.ddev.php #6192

Conversation

doradovictor
Copy link
Contributor

@doradovictor doradovictor commented May 16, 2024

The Issue

When you have other default transport than sendmail, DDEV doesn't switch correctly Drupal config to use Mailpit.

We ran into this issue because we were using a custom transport in order to send our mails through an external service (Sendgrid). If "sendmail" is not the default transport, current DDEV tweaking technique for redirecting mail to Mailpit is not taking effect.

How This PR Solves The Issue

It also sets the default transport as sendmail, besides changing the sendmail transport configuration.

Manual Testing Instructions

Configure another transport in Drupal Symfony Mailer and test that it is correctly overriden by DDEV to use Mailpit.

@doradovictor doradovictor requested a review from a team as a code owner May 16, 2024 07:24
@rfay rfay changed the title fix: correctly switch to mailpit also when sendmail is not the default transport fix: (Drupal) switch to sendmail transport always May 16, 2024
@rfay
Copy link
Member

rfay commented May 16, 2024

Thanks @doradovictor - Could you please update the OP to show what your situation was and why you ran into this? Thanks!

Copy link

github-actions bot commented May 16, 2024

@rfay rfay changed the title fix: (Drupal) switch to sendmail transport always fix: Drupal - switch to sendmail transport always in settings.ddev.php May 16, 2024
@doradovictor
Copy link
Contributor Author

Thanks @doradovictor - Could you please update the OP to show what your situation was and why you ran into this? Thanks

I tried to explain it better! 😊

@rfay
Copy link
Member

rfay commented May 20, 2024

Sorry for the conflict here @doradovictor but there was a phpcs-based refactor that went in before yours,

Would you mind rebasing this (or just recreating it if that's easier)?

@doradovictor
Copy link
Contributor Author

@rfay I followed Github instructions and merged master with my branch, resolving conflicts. Is it ok now? :)

Copy link
Member

@penyaskito penyaskito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this but makes sense to me.

@rfay rfay merged commit 346f592 into ddev:master Jun 2, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants