Django SMTPAuthenticationError




######################################################
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'mailid'
EMAIL_HOST_PASSWORD = '16 digit apppassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True


in the above settings.py, EMAIL_HOST_PASSWORD means we need to create APP PASSWORD for particular user id....

Steps to create APP PASSWORD:

1. Go to this link 'https://support.google.com/accounts/answer/185833?vid=1-635751353521726173-14043586420483817130'
2. Click on 'How to generate an App password' link
3. Click on Visit your App passwords page. You may be asked to sign in to your Google Account.
4. It will ask gmail id , password..and follow the next instructions..
5. You will get an app password, copy the password and past it in the settings.py in the place of EMAIL_HOST_PASSWORD = 'Past Here'

No comments:

Post a Comment