Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Help on Email Sending with the Gmail SMTP server.

276 views
Skip to first unread message

ALINDA Fortunate

unread,
Oct 31, 2024, 9:18:46 AM10/31/24
to django...@googlegroups.com
Hello Team, I am requesting for assistance on how to send email using Django by the Gmail SMTP server, I have set up the app configured the credentials but i am getting this error message, some help.

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a9e566435c0sm67540266b.162 - gsmtp')

image.png

--
ALINDA Fortunate
Graduate Of Computer Science
Gulu University
Passionate about Software Development in Python
If you can't explain it simply, you don't understand it well enough.
Kagadi.

Pablo Riquelme

unread,
Oct 31, 2024, 10:06:33 AM10/31/24
to django...@googlegroups.com

To use Gmail with user and password you need to enable "Insecure apps" in your Gmail account, I don't remember if this setting gives you an specific password different from your normal login or not, but I don't recommend using Gmail as SMTP because it can flag your account as spam and block it, I use zeptomail from Zoho to send transactional emails, it's cheap and less difficult to gain prod access


--
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 visit https://groups.google.com/d/msgid/django-users/CAPifpCv-Nezxtvc0H-VRAjoXWK_kF%3DYgqUsRn2i-jObOmfhqmw%40mail.gmail.com.

Nathaniel Anania

unread,
Oct 31, 2024, 10:06:53 AM10/31/24
to django...@googlegroups.com
Hi Alinda,

With Google, you have to create a special app password don't use password of your email . follow this guide to create app password How To create App Password.

Regards,
Nathaniel Anania

--

Ryan Nowakowski

unread,
Oct 31, 2024, 10:26:17 AM10/31/24
to django...@googlegroups.com
If you have 2 factor authentication turned on, you'll need to create an app specific password. This thread has some other suggestions: <https://support.google.com/mail/thread/5579215/smtp-server-username-password?hl=en>


On October 31, 2024 8:17:31 AM CDT, ALINDA Fortunate <alindafo...@gmail.com> wrote:
Hello Team, I am requesting for assistance on how to send email using Django by the Gmail SMTP server, I have set up the app configured the credentials but i am getting this error message, some help.

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a9e566435c0sm67540266b.162 - gsmtp')

image.png

--

Sang

unread,
Oct 31, 2024, 10:48:06 AM10/31/24
to django...@googlegroups.com
I assume you need to enable IMAP and POP settings. I haven't tried it for a while, this is for paid gsuite workspace emails https://support.google.com/a/answer/9003945?hl=en

Have you configured it the setting for your Gmail to use third party apps??

--

ALINDA Fortunate

unread,
Oct 31, 2024, 2:00:27 PM10/31/24
to django...@googlegroups.com

Thanks so much Team, it has finally worked, I created a secure app and it worked perfectly. Thank you I am humbled for you guidance.

+256774339676

 "If you want to live a happy life, tie it to a goal, not to people or things."

A graduate of Bachelors Degree of Science in Computer Science of Gulu University.

@FortunateAlinda
Passionate about Python Development
And Computer related Dynamics

Reddy Tintaya

unread,
Oct 31, 2024, 2:14:37 PM10/31/24
to django...@googlegroups.com
Isn’t it a risky way? Especially if you are just starting and don’t know too much about security.
I would use MailChimp or any other service that can send the emails.

On 31 Oct 2024, at 12:59 PM, ALINDA Fortunate <alindafo...@gmail.com> wrote:

Thanks so much Team, it has finally worked, I created a secure app and it worked perfectly. Thank you I am humbled for you guidance.

+256774339676

 "If you want to live a happy life, tie it to a goal, not to people or things."

A graduate of Bachelors Degree of Science in Computer Science of Gulu University.

@FortunateAlinda
Passionate about Python Development
And Computer related Dynamics

On Thu, Oct 31, 2024, 17:47 Sang <sang....@gmail.com> wrote:
I assume you need to enable IMAP and POP settings. I haven't tried it for a while, this is for paid gsuite workspace emails https://support.google.com/a/answer/9003945?hl=en

Have you configured it the setting for your Gmail to use third party apps??

On Thu, Oct 31, 2024, 18:48 ALINDA Fortunate <alindafo...@gmail.com> wrote:
Hello Team, I am requesting for assistance on how to send email using Django by the Gmail SMTP server, I have set up the app configured the credentials but i am getting this error message, some help.

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a9e566435c0sm67540266b.162 - gsmtp')

<image.png>

--
ALINDA Fortunate
Graduate Of Computer Science
Gulu University
Passionate about Software Development in Python
If you can't explain it simply, you don't understand it well enough.
Kagadi.

--
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 visit https://groups.google.com/d/msgid/django-users/CAPifpCv-Nezxtvc0H-VRAjoXWK_kF%3DYgqUsRn2i-jObOmfhqmw%40mail.gmail.com.

--
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 visit https://groups.google.com/d/msgid/django-users/CAMg_NacgeLe6m_O3DbwEsFHMuC41pZ0bkQ%2BVb%3DJqoahEUvHU8A%40mail.gmail.com.

--
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.

Sadiq Cp

unread,
Oct 31, 2024, 2:38:21 PM10/31/24
to django...@googlegroups.com
Hi Alinda,

So you are using smtplib for email. From my experience on working with smtplib, its a good choice for testing mail during development phase. But in production, it takes a long time.

Try choosing WEB3forms. Its easy to implement and better in production.

Thanks......

ALINDA Fortunate

unread,
Nov 1, 2024, 5:42:34 AM11/1/24
to django...@googlegroups.com

Hello friends I am using it for development and learning purposes.

I had earlier on used SendGrid on a production environment.

For now I am on my way mastering Django and I appreciate the feedback from each one of you.

When I cross over to production I will be leveraging on some recommendations from the team.

Thank you all.

+256774339676

 "If you want to live a happy life, tie it to a goal, not to people or things."

A graduate of Bachelors Degree of Science in Computer Science of Gulu University.

@FortunateAlinda
Passionate about Python Development
And Computer related Dynamics

George Joseph

unread,
Dec 4, 2024, 10:11:17 PM12/4/24
to Django users
Hi, Try by creating app password from your  g-suite. Thanks and regards.

Luis Zárate

unread,
Dec 5, 2024, 3:06:38 PM12/5/24
to django...@googlegroups.com
Do you configure the "Less secure app access" in your gmail account?


--
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.


--
"La utopía sirve para caminar" Fernando Birri


Reply all
Reply to author
Forward
0 new messages