请教各位老哥,利用django内置的send_mail发邮件,控制台返回1,但是邮箱收不到邮件是为啥

如题,最近在跟着django by example 过代码,在利用发邮件那块碰到了这个问题:

send_mail('Django mail', 'This e-mail was sent with Django.', 'tsparrot@163.com', ['tsparrot@bupt.edu.cn'], fail_silently=False)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Django mail
From: tsparrot@163.com
To: tsparrot@bupt.edu.cn
Date: Tue, 24 Sep 2019 12:13:52 -0000
Message-ID: <156932723252.2292.9961510806832267166@tsparrot>

This e-mail was sent with Django.
-------------------------------------------------------------------------------
1

邮箱收不到邮件是为啥

评论 1

  • 大兄弟,源码和依赖包都给出来大家才能帮你找问题。不然的话环境不一样不一定能重现bug