sklarsa / django-sendgrid-v5

An implementation of Django's EmailBackend compatible with sendgrid-python v5+
MIT License
323 stars 54 forks source link

HTTPMessage object has no attribute getheader #31

Closed ryosuke-kubota closed 6 years ago

ryosuke-kubota commented 6 years ago

In your recent commit https://github.com/sklarsa/django-sendgrid-v5/commit/8a2eab4149f3b47f5d9cbcb9e40432cf086fe226, you're trying to call getheader from an HTTPMessage object that doesn't have such attribute.

msg.extra_headers['message_id'] = resp.headers.getheader('x-message-id')

Django Version: 2.0.6 django-sendgrid-v5 version: 0.6.89

No problem with v0.6.88

EmadMokhtar commented 6 years ago

I've done some readings and SendGrid docs didn't mention it can be empty.