django通知不发送任何电子邮件

django通知不发送任何电子邮件,django,email,notifications,Django,Email,Notifications,我正在尝试使用它,但我无法让它发送任何电子邮件。通知出现在通知中,但当我执行python manage.py emit_通知时,我得到的是: acquiring lock... acquired. (0.001) SELECT `notification_noticequeuebatch`.`id`, `notification_noticequeuebatch`.`pickled_data` FROM `notification_noticequeuebatch`; args=() relea

我正在尝试使用它,但我无法让它发送任何电子邮件。通知出现在通知中,但当我执行python manage.py emit_通知时,我得到的是:

acquiring lock...
acquired.
(0.001) SELECT `notification_noticequeuebatch`.`id`, `notification_noticequeuebatch`.`pickled_data` FROM `notification_noticequeuebatch`; args=()
releasing lock...
released.

0 batches, 0 sent
done in 0.00 seconds
这是发送通知的代码:

admin = User.objects.get(id=1)
notification.send_now([amin], "order_form_created", {"from_user": admin})
通知设置看起来不错,我的用户订阅了此类通知。据我所知,该应用程序在通知批中查找,这些批始终为空


编辑:看起来问题出在电子邮件服务器上。。我使用了一个外部SMTP,它工作了。

您现在正在执行send\u now()那么为什么要使用emit\u notices管理命令?

尝试
notification.queue(..)
而不是
send\u now(..)
然后使用python manage.py
emit\u notices

因为
send
不起作用,所以我尝试了
send\u now
。。没有任何结果。您可以通过在单独的窗口中执行python-msmtpd-n-c DebuggingServer localhost:10025来运行自己的“调试”电子邮件服务器。它只需将收到的所有电子邮件打印到该窗口即可。