Skip to content

Upgrade to Symfony 4.4 - #1144

Merged
Seldaek merged 21 commits into
masterfrom
sf-upgrade
Jan 13, 2021
Merged

Seldaek merged 21 commits into
masterfrom
sf-upgrade

Conversation

@Seldaek

@Seldaek Seldaek commented Dec 1, 2020

Copy link
Copy Markdown
Member

Not quite finished yet.

@Seldaek Seldaek mentioned this pull request Dec 1, 2020
Comment thread composer.json Resolved
Comment thread config/packages/framework.yaml Resolved
Comment thread config/services.yaml Resolved
Comment thread config/services.yaml Resolved
Comment thread config/services.yaml Resolved
Comment thread config/services.yaml Resolved
Comment thread src/Controller/UserController.php Resolved
Comment thread config/services.yaml Resolved
Comment thread config/packages/dev/mailer.yaml Outdated
Comment on lines +4 to +5
# TODO this does not seem to work
recipients: ['%env(APP_DEV_EMAIL_RECIPIENT)%']

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Anyone has a clue here why this would fail? I have the env var set in .env.local, and yet emails seem to go wherever they want.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This goes far beyond my understanding of the Mailer component, but...

With Mailtrap set up on SMTP, inside the SmtpTransport class when I dump the recipients I get the right address (the one from this config), but when I dump the message stream the body it builds has the original email address added to the email. That's about as far as I can get before I'm over my head.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Emails have 2 different concepts: the recipients in the mime messages (the To and Cc headers) and the recipients in the SMTP protocol (which is where the email gets routed by SMTP).
When using this recipients feature, the Mailer component overrides things only at the level of the SMTP envelope, not in the mime headers. So you will still see the original recipients in the headers in your email client, even though emails should be delivered to your own mailbox.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah that may explain the problem I saw then, as I tested it with a foo@ alias which lands in my inbox anyway.. Will test overriding with an other domain entirely.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you could look at the Delivered-To headers in the received email (which is how these SMTP-level features are surfaced)

@Seldaek

Seldaek commented Dec 11, 2020

Copy link
Copy Markdown
Member Author

Thanks for the review @stof - fixed everything and the couple other TODOs I had left. Happy to get another round of review now I think it's all done.

Only problem left that I am aware of is the comment I wrote above about mailer.yaml.

Comment thread config/packages/twig.yaml Resolved
@Seldaek
Seldaek merged commit ce76a29 into master Jan 13, 2021
@Seldaek
Seldaek deleted the sf-upgrade branch January 13, 2021 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants