SMTPConnectError: (421, b'Server busy, too many connections')

Issue

I have watched videos and practice the same thing yet I keep getting smtp connect error

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

Solution

Here is a sample code and it shows how the connection to the server is closed server.quit().

import smtplib

server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.login("your username", "your password")
server.sendmail(
  "[email protected]", 
  "[email protected]", 
  "this message is from python")
server.quit()

Answered By – High-Octane

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published