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

Support for Broadcasting Streams #28

Closed
beberlei opened this issue Jun 4, 2020 · 1 comment · Fixed by #35
Closed

Support for Broadcasting Streams #28

beberlei opened this issue Jun 4, 2020 · 1 comment · Fixed by #35

Comments

@beberlei
Copy link
Contributor

beberlei commented Jun 4, 2020

The Swiftmailer transport for Postmark does not support broadcasting streams yet.

The method getMessagePayload needs to check for the X-PM-Message-Stream header defined in the docs to set the "streams" json key:

https://github.com/wildbit/swiftmailer-postmark/blob/master/src/Postmark/Transport.php#L167

https://postmarkapp.com/support/article/1207-how-to-create-and-send-through-message-streams

@vladsandu
Copy link
Contributor

@beberlei Thank you for submitting this PR and sorry for the delayed reply here.

As discussed in #20 , we want to defer most of this work to the API so that customers don't need to update their clients as frequently/when we add new functionality.

The Postmark API already supports setting the MessageStream via either the MessageStream field or the X-PM-Message-Stream header, like it's done for SMTP.

I have just tested this and can confirm that swiftmailer-postmark supports setting the MessageStream per message via:

$message->getHeaders()->addTextHeader('X-PM-Message-Stream', 'your-custom-stream');

The ability to set the MessageStream at transport-level might be useful for customers and we'll look over the PR and consider that as well, but you should already be able to set this at message-level.

beberlei added a commit to beberlei/swiftmailer-postmark that referenced this issue Aug 31, 2020
beberlei added a commit to beberlei/swiftmailer-postmark that referenced this issue Aug 31, 2020
vladsandu added a commit that referenced this issue Sep 5, 2020
[GH-28] Allow to set default headers for every message
ferrastas pushed a commit to Werkspot/swiftmailer-postmark that referenced this issue Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants