Timeout error in send_mail function

Skip to first unread message

Sona Sivasundari

Jun 23, 2022, 1:17:50 PMJun 23
to Django users
I'm working on a project with django and django rest framework.
In one of my views, I tried implementing a simple send_mail, but it gives me a TimeOut error. I configured the settings (Email backend as smtp, email host, password, ...), and also alowed my email to accept 'less secured apps',  but it doesn't seem to work.
I also tried the port 25, 587 and 465. None of that seem to work.

Here is the error:
[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Can someone please help?
Thanks in advance. 

K Wong

Jul 4, 2022, 6:29:39 PMJul 4
to Django users
If you know that Django is trying to send the email then the problem lies in the local operating system and the network.

If you are developing on windows then the windows firewall might be blocking you. If you are at home then your router might be blocking you. If you are trying to send outside your LAN then your ISP is almost certainly blocking you (or else it should be).

Personally, I wouldn't worry about testing the email sending routine on a local dev machine. Just output the email contents to the runserver console. That's it.


Yeboah Dominic

Jul 5, 2022, 11:05:36 AMJul 5
to django...@googlegroups.com
This is due to a poor network.

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/5583023c-d727-4473-b6f6-999f3bfc99edn%40googlegroups.com.
Reply all
Reply to author
0 new messages