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

Mandrill - unique id #31

Closed
davidvandertuijn opened this issue Jun 15, 2022 · 1 comment
Closed

Mandrill - unique id #31

davidvandertuijn opened this issue Jun 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@davidvandertuijn
Copy link

How to retrieve the unique Mandrill id of the message ?

@luisdalmolin luisdalmolin added the enhancement New feature or request label Mar 10, 2023
thybag added a commit to thybag/laravel-mandrill-driver that referenced this issue Apr 3, 2023
This PR is just for visibility. Will PR upstream once complete.

Make the Mandrill message `id` accessible from the Laravel via the sent event. Message id is now available via
*  the `sentMessage` messageId property. `e.g. $event->sent->getMessageId()`
* the `X-Message-ID` header `$event->message->getHeaders()->get('X-Message-ID')`

The `X-Message-ID`  convention is taken from Laravel maintained mail drivers including the base SES driver.

Additionally fixes headers not being sent as part of the Mail payload, causing `X-MC-Subaccount` and similar headers not to work as expected. 

In theory this should resolve luisdalmolin#30 and luisdalmolin#31

Unit tests for the message _id retrieval and header submission have been added. This did require a minor change to the Transport in order to facilitate mocking of the underlying Guzzle instance.
@vjanssens
Copy link
Contributor

See https://github.com/luisdalmolin/laravel-mandrill-driver?tab=readme-ov-file#accessing-mandrill-message-id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants