Custom header in wordpress

Hi. I use gravity forms in wordpress connected to Brevo using the Fluent SMTP plugin. Works fine.
I added a filter to add a new header to my outgoing gravity form emails. This is not working - the header does not appear in the final email.
When i disable the Fluent SMTP plugin and therefore bypass Brevo, the header does appear.
How can i stop brevo overwriting my header?

Hi @billyqureshi , thanks for posting on this community.

To what extent do you need the Fluent SMTP plugin? I’m not a master of it, but as Brevo is supposed to already let you send SMTP emails, could you please elaborate on why you need another plugin?

Hi. Thanks for coming back to me.
Essentially I don’t use the brevo email api to send transactional emails. I send them as using Wordpress email wp_mail(), and the emails usually originate from a forms plugin called gravity forms.
This means I can’t add tags or other custom data to the email, as I could if I used brevo email api.
So the only way to add custom data is by adding a custom header with X-Mailin-custom and this does work.
The issue is Wordpress users need a plugin to connect the wp to brevo. You can use fluent smtp or brevos own smtp plugin, but they both overwrite headers so the custom value is lost.
I have now discovered that gravity forms offers an smtp plugin which does not overwrite the headers. So I can now send transactional email via Wordpress which retains my custom header , and so use brevo webhooks to get notifications for failed emails which contain the custom value from the header , helping me trace the source of the failed email.
I hope this clarifies my situation.

To clarify, it was fluent smtp that overwrites the header, not brevo itself.

1 Like