django smtp.gmail error

22 views
Skip to first unread message

Chelsea Fan

unread,
May 17, 2023, 9:47:46 AM5/17/23
to django...@googlegroups.com
how can I solve this? I enabled 2fa then created app password but it does not work.
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')

Lakshyaraj Dash

unread,
May 17, 2023, 9:54:56 AM5/17/23
to django...@googlegroups.com
First verify if the email through which the app password was created is same or different. If different then it will not work.
OR
Please recreate a new app and copy the password again and enter.

Thanks and Regards
Lakshyaraj Dash

On Wed, May 17, 2023, 19:17 Chelsea Fan <allaberdi...@gmail.com> wrote:
how can I solve this? I enabled 2fa then created app password but it does not work.
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.com.

Chelsea Fan

unread,
May 17, 2023, 10:05:52 AM5/17/23
to django...@googlegroups.com
I deleted all passwords and thhen created new password but nothig was happen

Vishesh Mangla

unread,
May 17, 2023, 10:07:47 AM5/17/23
to django...@googlegroups.com
Are you logging through Gmail?

Chelsea Fan

unread,
May 17, 2023, 10:09:50 AM5/17/23
to django...@googlegroups.com

Vishesh Mangla

unread,
May 17, 2023, 10:10:37 AM5/17/23
to django...@googlegroups.com
You can't use SMTP with Google.
You need to use oauth through Google cloud platform. Actually there is one way to use SMTP with Google to login through third party apps. Check out my stories on medium. I had written one for a solution.

Chelsea Fan

unread,
May 17, 2023, 10:21:22 AM5/17/23
to django...@googlegroups.com
how can I find your medium stories?

Lakshyaraj Dash

unread,
May 17, 2023, 9:25:40 PM5/17/23
to django...@googlegroups.com
Bro if so then check the email address with which you created your app password and the email address used by your application.

Thanks and regards
Lakshyaraj Dash

Lakshyaraj Dash

unread,
May 17, 2023, 9:26:58 PM5/17/23
to django...@googlegroups.com
Dear Vishesh,
You can use SMTP login with 2FA. I've also built many applications using SMTP

Vishesh Mangla

unread,
May 18, 2023, 12:53:40 AM5/18/23
to django...@googlegroups.com

Chelsea Fan

unread,
May 18, 2023, 1:33:53 AM5/18/23
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages