Set to field when using merge_data#14
Set to field when using merge_data#14medmunds merged 4 commits intoanymail:masterfrom dangerfarms:patch-1
Conversation
The `to` field is required even if providing recipient addresses in x-smtpapi. See https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-send.
|
Please note I'm stacked with another project and haven't added any regression tests for it. Update: Just decided to modify the test. |
|
Thanks for this. I'm a little confused by SendGrid's docs on this. As you point out,
With merge_data (batch send), we definitely want to hide the recipients from each other. If you provide both |
OK, quick test answered my own question: with both Thanks for the fix. I'll add an integration test for this, too. |
* Set to field when using merge_data The `to` field is required even if providing recipient addresses in x-smtpapi. See https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-send. * Check data['to'] contains expected emails * Add space for toname check * Make `to` expected data contain email only (cherry picked from commit 72d8994)
|
@medmunds I had a chance to talk to SendGrid support on this awhile back. The x-smtpapi When using the x-smtpapi I do agree that the SendGrid docs could make this clearer. |
|
@avelis thanks- that's helpful to know. Using @lewistaylor I already released your PR (with a couple of tweaks) as 0.3.1. You may need to rebase before updating this PR. (Or just submit a new one if that's easier.) |
Set ignored (but required-valid) `to` field to the from_email for batch send with merge_data. See #14 (comment)
The
tofield is required even if providing recipient addresses in x-smtpapi. See https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-send.