getbrevo / brevo-php

A fully-featured PHP API client to interact with Brevo.
https://developers.brevo.com/
MIT License
51 stars 23 forks source link

Sanitize value before sending the request #30

Open Eliepse opened 4 months ago

Eliepse commented 4 months ago

Hello ! This is not a bug, but a feature request.

Some times, when sending a request (like sending a transactional email), the request is rejected by the server because some fields are present but empty. I think it would be very beneficial in such case to have a sanitation pass to null some optional elements.

Here are two causes of rejection I faced when sending a transactional :

Would be great to have the Brevo package that do that bit extra validation/sanitation. Thank you !