Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29903

How to send emails from Gmail without turning off "allow less secure apps" setting?

$
0
0

Is there any way to send an email in a Django project without turning on the "allow less secure apps" feature? Is using OAuth2 a must or can I send it using Google's API?

So far, I just use:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '587'
EMAIL_HOST_USER = 'myemailaddress'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False

But this gives me an SMTPAuthenticationError, which only works when I turn on "allow less secure apps" in Google. Is there any way to circumvent this without using OAuth2 and allow multiple users to login to that account easily?


Viewing all articles
Browse latest Browse all 29903

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>