-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Add new attributes to Infobip API transport #49491
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] Add new attributes to Infobip API transport #49491
Conversation
9cf1959
to
2ade00d
Compare
6.3 | ||
--- | ||
|
||
* Add infobip reporting behavior thanks to new attributes support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add infobip reporting behavior thanks to new attributes support | |
* Add reporting behavior thanks to new attributes support |
2ade00d
to
5a20137
Compare
@@ -123,6 +123,24 @@ private function formDataPart(Email $email, Envelope $envelope): FormDataPart | |||
|
|||
$this->attachmentsFormData($fields, $email); | |||
|
|||
$headers = $email->getHeaders(); | |||
|
|||
if ($headers->has('intermediateReport')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that all custom headers specific to a provider should be prefixed with something like X-Infobip-
.
It will prevent collision with other providers that may use the same custom headers.
You can look at other provider code 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this feedback. I reworked the code to use the same behavior as Mailjet and I think it's better.
I tried it too in real condition in our projet and it works as expected.
bb9164d
to
469a10c
Compare
03cab3d
to
4d7facd
Compare
Thank you @ndousson. |
📍 Context
Infobip has a mechanism to send back SMS status like webhook do.
To do that, we need to add some attributes to the payload.
This MR aim to add this attributes.
It's a need for our company so I hope this new "feature" will be supported by the transport.
➕ New feature
New payload attributes was added allowing end users to use the reporting.
application/json
orapplication/xml
.ℹ️ Note that no one of this attributes are required.