+ 1
"Connection Refused" Error while sending mails in Django
I am developing a Django based website where I have made a feature that whenever someone fills the contact form and submits it, he receives a confirmation email. I was using Gmail's SMTP. The code was working fine local server. But as soon as I uploaded the project to live server, Gmail started blocking the emails. I googled and found that Gmail blacklists some hosting servers from sending email. So I changed the SMTP to Yahoo's. But then I started getting "Connection Refused" even on my local server. I have also tried some other email services' SMTP. I am using right credentials but then also getting this error. I can't send emails even from local server. Why is it happening?
5 Respostas
+ 3
I don't think he exceeded the limit as his app is still in development stage and 100 recipients are much ...
I think the problem is in the mail server.
I found this related questions: https://stackoverflow.com/questions/55569031/django-email-sending-on-heroku
Try to use other apps(designed to send mails) like SendGrid as suggested in the answer.
I am not familiar with Heroku, but I think they provide installation of such apps/add-ons and there are also free plans available for these services.
+ 3
Maybe you have exceeded your daily quota? Found this here:
https://support.google.com/mail/thread/40988320/i-have-created-gmail-api-for-my-wordpress-website-to-send-mails-but-it-gives-me-error?hl=en
"You are allowed only 100 recipients every rollong 24 hours when sending from an app."
+ 1
If you are using a gmail account then make sure you have enabled "less secured login" in your account.
+ 1
I also think that I should use other apps for sending emails
0
I did it. But it worked on local server. Gmail blocked hosting server.