4👍
Your email backend setting is set to use the console. If you’re just debugging that’s fine, you can see how the emails would look like in the console and copy your password reset link from there.
If you really want to send an email, use the SMTP backend: Set EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
.
But beware, don’t send emails to fake addresses using that, you’ll get in trouble if you have too many bounces on your sendgrid account.
Also if you’re going to use SendGrid in production, use the API instead of SMTP. django-anymail (but there are also other packages) provides a backend to use the API.
Update June 2021
Sendgrid doesn’t allow simple username/password authentication anymore (and forces you to login with 2FA). You should use the API, or create an app password specifically for your server and use that instead of your normal password.
0👍
I’d say the settings are like they should be, taking into account that you of course don’t intend to go into production without securing your info (ie creating environment variables). You are going to do this, I assume, but if not, you really, really should consider that.
Also it’s these are your actual settings, you should edit this post right now. They’re supposed to be kept secret, otherwise you’re gonna have a real bad day shortly.
Given the nature of your problem, I’m halfway expecting that you’re not testing it from a development setting, but rather that you’ve tried to run it from production. It is also my suspicion, that you’re using Pythonanywhere or Heroku with a free account. Let me know if I’m all wrong here 🙂
The skinny is this: Without coughing up those $5, those two providers (and other providers add well, I presume) won’t let you use sendgrid.
If I’m assuming wrongly, I’d appreciate seeing the views.py that handles the sending of email.
- [Django]-Implement get_serializer in generic list view (generics.ListCreateAPIView) in Django REST Framework
- [Django]-Drf-yasg/drf-spectacular – description for filter parameters