Skip to content

Implement Message Stream for Postmark Mailer #42941

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

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Implement Message Stream for Postmark Mailer #42941

merged 1 commit into from
Sep 10, 2021

Conversation

driesvints
Copy link
Contributor

@driesvints driesvints commented Sep 8, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes (I did not find a changelog for 5.4)
Deprecations? no
Tickets
License MIT
Doc PR There doesn't appear to be a Postmark section in the docs right now

This PR provide's support for Postmark's separate Message Stream feature in both the API and SMTP transports. I've added the ability to both add a default Message Stream for the entire transport as well as specific message streams per email.

Right now in Laravel users have the ability to define a default Message Stream per transport through the wildbit/swiftmailer-postmark package. But unfortunately Symfony Mailer, which we're switching to for the upcoming Laravel v9 release doesn't has this feature yet. That's why we decided to send in this PR so both Symfony and Laravel users can enjoy this feature from Postmark. This PR is needed for laravel/framework#38481

I've added a new MessageStreamHeader specifically for Postmark because it's a Postmark specific feature.

Documentation for SMTP can be found here: https://postmarkapp.com/support/article/1207-how-to-create-and-send-through-message-streams
Documentation for API can be found here: https://postmarkapp.com/developer/api/email-api

Current setup through Laravel can be found here: https://laravel.com/docs/8.x/mail#postmark-driver
Another example is Mailcoach by Spatie: https://spatie.be/docs/laravel-mailcoach/v4/configuring-mail-providers/postmark#setting-the-message-stream-in-your-laravel-app

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@driesvints
Copy link
Contributor Author

There seem to be some code style issues but fabbot.io doesn't say what they are.

@driesvints
Copy link
Contributor Author

I accidentally set "deprecations" to yes instead of no so carsonbot marked this PR as such, sorry.

@javiereguiluz
Copy link
Member

Dries, we removed the deprecation label. Thanks for telling us.

@driesvints driesvints changed the title Implement Message Stream for Postmark Mailer [Mailer] Implement Message Stream for Postmark Mailer Sep 8, 2021
@Jubeki
Copy link
Contributor

Jubeki commented Sep 8, 2021

Screenshot 2021-09-08 at 17 36 50

@driesvints You can click on Preview to see the needed changes.

@driesvints
Copy link
Contributor Author

I don't see a Preview button.

@Jubeki
Copy link
Contributor

Jubeki commented Sep 8, 2021

Screenshot 2021-09-08 at 17 48 43

It seems like I can't read it says Review

@driesvints
Copy link
Contributor Author

@Jubeki ah wow, totally missed that. I was clicking the red "3" all the time 😅

Thanks, got those fixed

@OskarStark OskarStark requested a review from fabpot September 9, 2021 02:54
@nicolas-grekas nicolas-grekas added this to the 5.4 milestone Sep 9, 2021
@driesvints
Copy link
Contributor Author

Unsure why the AppVeyor build is failing. I can't see any failing tests but it's a little hard to digest with all the separate runs for the different components.

@andrew-demb
Copy link
Contributor

@driesvints as I can see, this is related to maximum build time exceeded (20 minutes) - https://ci.appveyor.com/project/fabpot/symfony/builds/40692324/messages

I think this fail should be skipped

@carsonbot carsonbot changed the title [Mailer] Implement Message Stream for Postmark Mailer Implement Message Stream for Postmark Mailer Sep 9, 2021
@fabpot
Copy link
Member

fabpot commented Sep 10, 2021

Thank you @driesvints.

@fabpot fabpot merged commit af5216c into symfony:5.4 Sep 10, 2021
@driesvints driesvints deleted the postmark-stream-header branch September 10, 2021 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants