sendgrid / sendgrid-ruby

The Official Twilio SendGrid Led, Community Driven Ruby API Library
https://sendgrid.com
MIT License
625 stars 322 forks source link

Duplicate checking when adding email to personalization is not accurate #445

Closed tmimura39 closed 3 years ago

tmimura39 commented 3 years ago

Issue Summary

About the duplicate check added by https://github.com/sendgrid/sendgrid-ruby/pull/437 It's not accurate to be case insensitive.

Steps to Reproduce

  1. Add uppercase email
  2. Add duplicate uppercase email
  3. No DuplicatePersonalizationError occurs
  4. Request processing runs and 400 is returned
childish-sambino commented 3 years ago

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

clinejj commented 3 years ago

A suggested improvement could be to manually de-duplicate rather than raising an error. The python and C# libraries are adding this functionality: https://github.com/sendgrid/sendgrid-python/issues/788 https://github.com/sendgrid/sendgrid-csharp/pull/991

(I admittedly didn't know that SendGrid would bounce an email back and am receiving this error, when I would rather just have the duplicates removed and the email sent)

netwire88 commented 3 years ago

I also have the same problem, if the same email address is in to and cc, then SendGrid::DuplicatePersonalizationError is raised.

netwire88 commented 3 years ago

@JenniferMah Hi, I'm using the latest build and having issues with 2 related scenarios:

  1. upper vs. lower case - if I have test1@example.com and TEST1@EXAMPLE.COM, that doesn't work
  2. to/cc/bcc fields - if I have test1@example.com in to field and cc field, then it doesn't work. Similarly with to and bcc, and cc & bcc
JenniferMah commented 3 years ago

Hi @netwire88 Could you please open a new issue with this information?

netwire88 commented 3 years ago

Sure