即使我从Google方面获得了所有许可,我也无法使用Django发送电子邮件

问题描述

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIT_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
EMAIL_USE_SSL= False


 send_mail(msg,"Thank-You for using our Website,Mail us if you have any Problem in Our Website.Thank-You Once again",settings.EMAIL_HOST_USER,[emailto,],fail_silently=False,)

即使尝试过,我也无法发送显示timeout error的邮件

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

我无法发送邮件,而不是在控制台中打印出来

[11/Sep/2020 23:07:49] "POST / HTTP/1.1" 200 3502
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Hello User
From: [email protected]
To: [email protected]
Date: Fri,11 Sep 2020 17:39:50 -0000
Message-ID: <159984599099.7876.4877994479538514933@UNIVERSE>

Thank-You for using our Website,Mail us if you have any Problem in Our Website.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)