开发者

django-notifications not sending any email

I'm trying to use django-notification and I can't get it to send any emails. The notifications appears in the Notices, but when I do python manage.py emit_notices this is what I get:

acquiring lock...
acquired.
(0.001) SELECT `notification_noticequeuebatch`.`id`, `notification_noticequeuebatch`.`pickled_data` FROM `notification_noticequeuebatch`; args=()
rele开发者_运维技巧asing lock...
released.

0 batches, 0 sent
done in 0.00 seconds

This is the code sending the Notice:

admin = User.objects.get(id=1)
notification.send_now([amin], "order_form_created", {"from_user": admin})

Notice settings looks right, my user is subscribed to this kind of notice. From what I understand the app looks in Notification Batches, which are always empty ..

Edit: Looks like the problem was the email server .. I used an external SMTP and it worked.


try notification.queue(..) instead of send_now(..) then python manage.py emit_notices


You are doing send_now() so why the emit_notices management command?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜