无法连接到 gmail smtp linode django apache2 设置

编程入门 行业动态 更新时间:2024-10-23 09:36:42
本文介绍了无法连接到 gmail smtp linode django apache2 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

您好,我无法连接到 google smtp 服务器.上下文是,每当用户填写表单时,我的程序都会自动将反馈通过电子邮件发送到我的 gmail 帐户.除了程序卡在 send_mail 函数中之外,一切正常.

Hello im having difficulties connecting to google smtp server. The context is that whenever a user fills in a form , my program will automatically email me the feedback to my gmail account. Everything is working except for the fact that the program is stuck within the send_mail function.

我试过这样做:

telnet smtp.gmail 25
Trying 2404:6800:4003:c03::6c...

这最终会导致超时.

这是我的一些代码:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail'
EMAIL_HOST_USER = 'xxxx@gmail'
EMAIL_HOST_PASSWORD = 'xxxxxx'
EMAIL_PORT = 465
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True                                                                                                                  
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER                                                                                                  
SERVER_EMAIL = DEFAULT_FROM_EMAIL     

根据 wagtail 的开箱即用(django cms 包)

As per out of the box from wagtail(django cms package)

我认为这可能与我的 UFW 阻止它有关,但是我尝试禁用 UFW 并重新启动 apache2.不幸的是,这无济于事.

I thought it might have to do with my UFW blocking it , however i have tried disabling the UFW and restarting apache2 . This unfortunately does not help.

Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)

我真的迷路了!请帮忙 .谢谢

I am really lost! Please help . Thanks

推荐答案

新创建的 Linode 帐户默认限制使用邮件端口(25、465 和 587).

Newly created Linode accounts restrict the use of mailing ports (25, 465, and 587) by default.

为了打击垃圾邮件,在 2019 年 11 月 5 日星期二之后创建的新 Linode 帐户默认限制了邮件端口(25、465 和 587)(请参阅我们的博客文章 此处 了解更多信息).

In an effort to fight spam, new Linode accounts created after Tuesday, 5 November, 2019 have mailing ports (25, 465, and 587) restricted by default (see our blog post here for more information).

但是,如果您想使用 Linodes 发送电子邮件,您首先需要配置:

However, If you would like to use your Linodes for sending emails, you will first need to configure :

有效的 DNS A 记录和 您计划用于发送电子邮件的任何 Linode 的 rDNS.

您可以在此处查看如何操作:[来源]

You can see how to do that here: [source]

这篇关于无法连接到 gmail smtp linode django apache2 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 00:34:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972783.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   gmail   smtp   django   linode

发布评论

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

>www.elefans.com

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