H
H
Hcuy2020-10-09 20:38:42
Django
Hcuy, 2020-10-09 20:38:42

SMTP not working in production?

Hello! You need to fasten the sending of a message (reviews) from the site to the mail. Everything works fine through the local server, but when I upload it to the hosting (heroku), it gives an error
SMTPAuthenticationError at /massage/
Next comes the suggestion to go to the mail from the browser and try again. Does not help. Next, I'll throw the smtp setting in settings.

#Gmail
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = '************'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

Am I doing something wrong? Please help! Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2020-10-09
@Hcuy

you don’t need a new acc + preferably 2FA and an application password,
then read what Gmail asks for, maybe he has Heroku in the bath

D
Dr. Bacon, 2020-10-09
@bacon

Stop using Google, mail and other similar mail services for this. With a high probability, in the fight against spammers, Google may block such connections or impose any restrictions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question