Hi Mostapha,
Thanks for taking your time to write a proper question with relevant
details. Not really related to the issue your facing, but a lot of
people could learn from that.
Considering the error you're seeing:
On 05/05/2021 23.53, Mostapha Bouderka wrote:
> 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
>
This error is coming from the operating system running your Django
application and is basically saying that it cannot contact the server
you want to use for sending your email.
This is what I would do to figure out the cause of the error:
Double check if you have really written the correct host and port in
your settings. We all make typos.
If you are absolutely certain about that, then I would try to connect to
the server in the lowest level way possible. Something like:
# telnet <host> <port>
Should work on most operating systems. Do that on the server/host that
is actually running your Django application. If you get the same error,
then you've come a bit closer to solving the issue.
If you do get the same error, then you problem is network related or
related to the mail server you're trying to reach. That has already
narrowed down your problem quite a bit.
Hope this makes some sense.
Additional information that might be useful to help you would be to know
which operating system is running your Django application and which kind
of mail server you're trying to reach.
Kind regards,
Kasper Laudrup