When sending an email on heroku I get this error:
No module named 'sendgrid_backend'
I have this set up in settings.py:
EMAIL_BACKEND = "sendgrid_backend.SendgridBackend"
SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY")
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'apikey'
EMAIL_HOST_PASSWORD = os.environ.get('SENDGRID_API_KEY')
I also did install of sendgrid using pip and included it in the requirements.txt
I think this will help you First, install the package
pip install sendgrid-django
and then create requirements.txt, email backend should be like this
EMAIL_BACKEND = "sgbackend.SendGridBackend"
or you can also do this
pip install django-sendgrid-v5
# https://github.com/sklarsa/django-sendgrid-v5
EMAIL_BACKEND = 'sendgrid_backend.SendgridBackend'
SENDGRID_API_KEY = '<SENDGRID_API_KEY>'
I think you should follow this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With