[READ] Step 1: Are you in the right place?
Yes β this is a bug in the firestore-send-email extension.
[REQUIRED] Step 2: Describe your configuration
- Extension name: firestore-send-email
- Extension version: 0.2.5
- Configuration values:
- SMTP host:
smtp.sendgrid.net (SendGrid provider)
[REQUIRED] Step 3: Describe the problem
Hey! We recently upgraded to version 0.2.5 from an older version and noticed that some SendGrid features we relied on stopped working silently.
In our previous setup, we were using the X-SMTPAPI header (SendGrid v2 SMTP API) to pass unique_args and ip_pool:
{
"to": "recipient@example.com",
"message": { "subject": "Test", "text": "Hello" },
"headers": {
"X-SMTPAPI": "{\"unique_args\": {\"campaign\": \"welcome\"}, \"ip_pool\": \"transactional\"}"
}
}
This used to work great because the extension sent emails via SMTP, where SendGrid picks up the X-SMTPAPI header automatically.
Version 0.2.5 now uses a custom SendGridTransport that calls the @sendgrid/mail v3 Web API directly instead of SMTP. The X-SMTPAPI header is no longer picked up. The v3 equivalents (customArgs, ipPoolName, etc.) would need to be passed as dedicated fields in the API payload, but the transport only forwards a hardcoded list of fields and quietly ignores the rest.
The tricky part is that there's no error or warning β emails go out fine, they just lose the extra SendGrid features. Also there is no note in the CHANGELOG about the SMTP-to-Web-API migration.
Steps to reproduce:
- Upgrade to version 0.2.5 from an older version that used SendGrid over SMTP
- Send an email with X-SMTPAPI header containing unique_args / ip_pool
- Check SendGrid Activity Feed or webhook events β unique_args are missing and IP pool selection is ignored
- Try using the v3 equivalents via sendGrid.customArgs / sendGrid.ipPoolName β these are also silently dropped
Expected result:
- The v3 API equivalents (customArgs, ipPoolName, sendAt, batchId, asm, trackingSettings) are supported as fields in the sendGrid document property
Actual result:
- X-SMTPAPI header is silently ignored
- v3 API fields like customArgs and ipPoolName are not forwarded to the SendGrid API
- No error or warning β emails send successfully but without the expected SendGrid features
We've already put together a fix for customArgs and ipPoolName and would be happy to open a PR.
[READ] Step 1: Are you in the right place?
Yes β this is a bug in the
firestore-send-emailextension.[REQUIRED] Step 2: Describe your configuration
smtp.sendgrid.net(SendGrid provider)[REQUIRED] Step 3: Describe the problem
Hey! We recently upgraded to version 0.2.5 from an older version and noticed that some SendGrid features we relied on stopped working silently.
In our previous setup, we were using the
X-SMTPAPIheader (SendGrid v2 SMTP API) to passunique_argsandip_pool:{ "to": "recipient@example.com", "message": { "subject": "Test", "text": "Hello" }, "headers": { "X-SMTPAPI": "{\"unique_args\": {\"campaign\": \"welcome\"}, \"ip_pool\": \"transactional\"}" } }This used to work great because the extension sent emails via SMTP, where SendGrid picks up the X-SMTPAPI header automatically.
Version 0.2.5 now uses a custom SendGridTransport that calls the
@sendgrid/mailv3Web API directly instead of SMTP. The X-SMTPAPI header is no longer picked up. The v3 equivalents (customArgs, ipPoolName, etc.) would need to be passed as dedicated fields in the API payload, but the transport only forwards a hardcoded list of fields and quietly ignores the rest.The tricky part is that there's no error or warning β emails go out fine, they just lose the extra SendGrid features. Also there is no note in the CHANGELOG about the SMTP-to-Web-API migration.
Steps to reproduce:
Expected result:
Actual result:
We've already put together a fix for customArgs and ipPoolName and would be happy to open a PR.