django-notification not sending email by default

535 Views Asked by At

Question,

I have created my NEW notification, my NEW notification templates for it. Once a user performs a particular action it creates the new record but no email gets sent.

Is django-notification suppose to send automatic emails to the user?

def new(request, template_name='wall/new.html', user=None):
    if request.method == 'POST':
        form = PostForm(request.POST)
        if form.is_valid():
            form.save()
            if request.POST.get('from_user') != request.POST.get('user'):
                if notification:
                    notification.send([request.user], "new_wall_post", {"user": request.user, "post": request.POST.get('text')})
1

There are 1 best solutions below

0
On

Yes, it's supposed to send it automatically.

Try checking:

1) That the notification setting for that "new_wall_post" is enabled for that user
2) The email is valid for the user
3) The user is active
4) The email backend is configured correctly

Also, did you mean to send the notification to the wall owner rather than the wall poster?