Search code examples
djangoemailgmail

I get this django error 421, b'service not available (connection refused, too many connections when signing up for my account, i dont really know?


SMTPConnectError at /investor/signup (421, b'service not available (connection refused, too many connections)')

This Error has been delaying for days now, i'm really stuck while sending email with django and i'm a beginner in django that why i do not have many idea on how to solve this issue please can anyone help?

Setting.py

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'xxxxxxxxxxxxxxxxxxxx'
EMAIL_USE_TLS = True 

Solution

  • To Fix this issue, the easiest way to is use to SendGrid as thier server doesn't throw all the regular error gmail Simple Mail Transfer Protocol Throws. To get started using SendGrid in django, this is the best tutorial Article 1 and Official SendGrid X Django Docs