implementing django behind proxy server

hello, so i was following django tutorials and when i reached the sending email for password reset it worked perfectly fine in my home internet. but when i try to do the same in my company which their internet is behind a proxy server. i keep getting gaierrors and temporary fail in name resolution because django is not being able to connect to the… i looked through documentation and i have not found any solution for this… please i cannot proceed in my work unless i find way to tell my django project that i am using it behind a proxy… how can i setup or configure this option?

It is possible that your work is blocking connections to certain sites, or the have an allowed site list that users are allowed to connect to, or even disallow traffic to certain ports.


i was in contact with the admin for this issue and he said the only traffic blocked are social media websites such as youtube, facebook, etc …
ps: i have the proxy configured on my ubuntu system and everything works except that email sending
i was advised to use http socket but i did not know where to add that bit of code or how exactly…
these my email settings for my project:

EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend’

It doesn’t look like you’ve got any credentials supplied for EMAIL_HOST_USER and EMAIL_HOST_PASSWORD - last time I used gmail to send emails, those fields were required.

1 Like