sendgrid / sendgrid-python

The Official Twilio SendGrid Python API Library
https://sendgrid.com
MIT License
1.53k stars 712 forks source link

fix: Fix add_header's handling of dicts #1077

Open JohnnyDeuss opened 8 months ago

JohnnyDeuss commented 8 months ago

Fixes

The docstring for Mail.add_header states that the headers can be a Header object or a dict, however, passing a dict breaks due to attempted if header.personalization is not None: check.

Checklist

If you have questions, please file a support ticket.