All of the recipients in a single personalization object (either in the to, cc, or bcc fields) will see the same email, as defined by the data in that personalization, as such we do not allow duplicate emails between these 3 arrays in a single personalization.
I want to get implemented method that checking duplicate email address specified into personalizations as case insensitive.
Steps to Reproduce
specify duplicate email address to "to addresses".
request to send email
get 400 error that says "Each unique email address in the personalizations array should only be included once. You have included [email address] more than once."
Exception/Log
I have checked how SendGrid behaves to duplicated email addresses.
Then, SendGrid returned 2 errors for following request body.
{
"errors": [
{
"message": "Each email address in the personalization block should be unique between to, cc, and bcc. We found the first duplicate instance of [test@example.com] in the personalizations.0.to field.",
"field": "personalizations.0",
"help": "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.recipient-errors"
},
{
"message": "Each email address in the personalization block should be unique between to, cc, and bcc. We found the first duplicate instance of [test@foobar.com] in the personalizations.0.cc field.",
"field": "personalizations.0",
"help": "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.recipient-errors"
}
]
}
Issue Summary
SendGrid says:
ref: https://sendgrid.com/docs/for-developers/sending-email/personalizations/
And https://github.com/sendgrid/sendgrid-csharp implements case insensitive comparison method. https://github.com/sendgrid/sendgrid-csharp/blob/23e4f6425c2d8546f1c8ca84bc2c93e5c5f9c1df/src/SendGrid/Helpers/Mail/Model/EmailAddress.cs#L91
I want to get implemented method that checking duplicate email address specified into personalizations as case insensitive.
Steps to Reproduce
Exception/Log
I have checked how SendGrid behaves to duplicated email addresses. Then, SendGrid returned 2 errors for following request body.
Request Body
Returned error