Transmission api setting wrong To header when specify header_to with multiple recipients

140 views Asked by At

I'm trying to send an email to multiple people(multiple to addresses) and have them all listed in the email clients like a regular email. When I set the header_to field on all recipients to [email protected], [email protected] I end up with emails that have a to header set to "First Name" <[email protected], [email protected]> which is incorrect.

This shows up as a single person with multiple email addresses in most clients and the header is wrong.

Why is the sparkpost transmission api messing with the header_to field? It's docs say that it uses this in place of generating a To header for you.

1

There are 1 answers

0
epelc On

After going through every page of docs I could find to try and figure out how sparkpost's backend works I've found that you must omit the Name field on all recipients.

https://developers.sparkpost.com/api/recipient-lists/#header-recipient-objectbad sparkpost header to