“[Errno 101] 网络无法访问"尝试使用 Django 发送电子邮件时

编程入门 行业动态 更新时间:2024-10-24 09:27:35
本文介绍了“[Errno 101] 网络无法访问"尝试使用 Django 发送电子邮件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

由于某种原因,我在尝试使用 Django 发送电子邮件(使用 gmail)时收到此错误.

For some reason I am getting this error when trying to send an email (with gmail) using Django.

[Errno 101] Network is unreachable

奇怪的是,它似乎只有在我的网络应用程序在我的服务器(bluehost)上运行时才会发生.它在本地运行良好.

The weird part about this is that it only seems to happen when my web app is running on my server (bluehost). It works fine when locally.

这是我的电子邮件设置

EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail' EMAIL_HOST_USER = 'email@gmail' EMAIL_HOST_PASSWORD = 'FakePassword' EMAIL_PORT = 587

知道如何解决这个问题吗?

Any idea as to how I can fix this?

推荐答案

这可能与您尝试从蓝色主机上发送电子邮件的端口有关.

This is likely to have to do with the port you are trying to send email from on the blue host machine.

出于安全原因,他们可能会阻止这样的端口.

They probably block ports like that for security reasons.

更多信息:my.bluehost/cgi/help/500

更多推荐

“[Errno 101] 网络无法访问"尝试使用 Django 发送电子邮件时

本文发布于:2023-11-23 10:10:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1621062.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法访问   发送电子邮件   网络   Errno   Django

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!