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

[Mailer] Send email tag to Postmark API #34766

wants to merge 1 commit into
base: 4.4


Copy link

AndreiIgna commented Dec 2, 2019

Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets no
License MIT

Postmark has some helpful functionality to tag emails, to make is easier to sort or filter in their UI.
Screenshot 2019-11-30 at 17 17 50

At the moment, tags can't be added when using the API transport. If adding a header "Tag: email-tag" to current email, the JSON payload is generated with that tag in "Headers" line and doesn't work.

This PR would allow the "Tag" header to be added at the root of JSON payload, ensuring valid payload for Postmark API making this work properly:

// creates $email
$email->getHeaders()->addTextHeader('Tag', 'account-emails');


@AndreiIgna AndreiIgna changed the title Updated - Send email tag to Postmark API [Mailer] Send email tag to Postmark API Dec 2, 2019
Copy link

OskarStark left a comment

Could you please add a testcase?


This comment has been minimized.

Copy link
Contributor Author

AndreiIgna commented Dec 2, 2019

I checked how to add a test for this, but I noticed tests for Transports are only for Transport connection and not JSON payloads.

This change is for the JSON payload sent to Postmark API, and the modified field is set in the standard email headers. I'm not sure how and where to add it

@fabpot fabpot added Feature and removed Bug labels Dec 3, 2019
@fabpot fabpot added this to the next milestone Dec 3, 2019
@fabpot fabpot added the Mailer label Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.