Closed timwilson closed 4 years ago
This looks like a permissions issue on the Sendgrid side. I would double-check the settings from your successful test email vs the settings your application is currently using, paying close attention to the API Key and its permissions in Sendgrid.
If you still have issues, I would maybe try raising the issue in sendgrid-python, since I believe that is maintained by sendgrid itself.
@sklarsa Thanks for the info. I'll work on that today and report back in this thread when I get it working so others might benefit.
@timwilson did you solve it? I'm having the same issue...
I think I solved it.
I went into https://app.sendgrid.com/settings/sender_auth/domains then on my verified domain I clicked on Use as default domain
, after that it works like a charm.
Before that, the from
email had to be @emXXXX.mydomain.com
otherwise I'd get the 403 error.
This is a very easy solution but I feel that Sendgrid should either:
1 - When you have only 1 domain validated, automatically set it as the default one 2 - Clearly document that you either need to set the domain as default, or you'll need to send emails from the random subdomain you set up.
Thanks for looking into this @dwjorgeb!
Good detective work, @dwjorgeb.
I had to set DEFAULT_FROM_EMAIL = foo@mydomain.com
to get this to work. The 'use as default domain' fix seems to have no effect. shrug
I'm working on getting SendGrid going and am having trouble with a 403 error when sending the Django user creation confirmation emails through SendGrid.
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
works fine. I see the confirmation emails there.Here's what I have in my settings:
Here's the error I'm getting after submitting the signup form that's part of the django-allauth package:
If I turn off debug mode, I get a server error:
"POST /accounts/signup/ HTTP/1.1" 500 145
I'm not even sure that this is related to the SendGrid integration, but when I bypass it, everything seems to work fine.
Any ideas what's going on?