Email notifications aren't working

New docker based installation.
E-mail account checked in the e-mail program - it works.
Test sending from the system also works:
“docker exec -it taiga-docker-taiga-back-1 bash
python3 manage.py sendtestemail user@domain.com
What could be the reason?

Hey,
I won’t be able to help a lot.

One thing you can do is running:

manage.py test_emails user@domain.com

It is more verbose and complete than sendtestemail.

1 Like

this is error from command manage.py test_emails user@domain.com

*Traceback (most recent call last):

  • File “/taiga-back/manage.py”, line 17, in
  • execute_from_command_line(sys.argv)
  • File “/opt/venv/lib/python3.11/site-packages/django/core/management/init.py”, line 419, in execute_from_command_line
  • utility.execute()
  • File “/opt/venv/lib/python3.11/site-packages/django/core/management/init.py”, line 413, in execute
  • self.fetch_command(subcommand).run_from_argv(self.argv)
  • File “/opt/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 354, in run_from_argv
  • self.execute(*args, **cmd_options)
  • File “/opt/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 398, in execute
  • output = self.handle(*args, **options)
  •         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
  • File “/taiga-back/taiga/base/management/commands/test_emails.py”, line 52, in handle
  • membership.invited_by = get_user_model().objects.all().order_by(“?”).first()
  • ^^^^^^^^^^^^^^^^^^^^^
    *AttributeError: ‘NoneType’ object has no attribute ‘invited_by’

Although I received the above error.
I receive an email - “You’ve been Taigatized!”
Notifications still not working…

This is because to run commands to send tests emails you need a populate database (with some users and some sample proyects). The comand ./taiga-manage.sh sample_data create some sample users and projects to tests the platform.

The user who make an action does not receive the email, only assigned users, watchers and users that select “Receive All” as project email notification option.

If you recive other emails, it couldbe some problem with the taiga async task worker. Try to print the logs during you are running taiga (docker compose logs -f taiga-async taiga-async-rabbitmq). Some comman error should be that taiga-async can’t connect with taiga-async-rabbitmq.