brevo-php icon indicating copy to clipboard operation
brevo-php copied to clipboard

Sanitize value before sending the request

Open Eliepse opened this issue 1 year ago • 0 comments

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 :

  • empty "name" for sender, etc. (the field shouldn't be empty if present),
  • empty "attachments" array

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

Eliepse avatar Jul 10 '24 14:07 Eliepse