Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Mail' object has no attribute 'set_from' on sendgrid==4.2.0 #56

Open
cypreess opened this issue Jun 26, 2017 · 3 comments
Open

'Mail' object has no attribute 'set_from' on sendgrid==4.2.0 #56

cypreess opened this issue Jun 26, 2017 · 3 comments

Comments

@cypreess
Copy link

When using:

sendgrid==4.2.0
sendgrid-django==4.0.4
django=1.11.2

whenever I want to send e-mail I got error:

File "/app/.heroku/python/lib/python3.6/site-packages/django/core/mail/message.py" in send
  348.         return self.get_connection(fail_silently).send_messages([self])

File "/app/.heroku/python/lib/python3.6/site-packages/sgbackend/mail.py" in send_messages
  66.             mail = self._build_sg_mail(email)

File "/app/.heroku/python/lib/python3.6/site-packages/sgbackend/mail.py" in _build_sg_mail
  82.         mail.set_from(Email(from_email, from_name))

Exception Type: AttributeError at /auth/password/reset/
Exception Value: 'Mail' object has no attribute 'set_from'

Downgrading to sendgrid==3.6.3 solves issue.

@cypreess
Copy link
Author

Oh - I just spotted that this package is not compatible with sendgrid packages above version 4.

Is there any particular reason for that?

@MIKNOTAURO
Copy link

MIKNOTAURO commented Jul 11, 2017

The official sendgrid client for python( sengrid-python 4.2.0) has some changes but it's already updated in this PR #53

@jayhale
Copy link

jayhale commented Sep 26, 2017

Also resolved with further upgrade to 5.x.x in #69

eranrund added a commit to FundersClub/fire that referenced this issue Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants