Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Function Not working! #80

Open
AmoghSaxena opened this issue May 3, 2022 · 6 comments
Open

Email Function Not working! #80

AmoghSaxena opened this issue May 3, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@AmoghSaxena
Copy link

The Setup is pretty Easy!
but when I setup email and tried to invite members then that function is not working.

Here is my composefile

version: "3.5"

x-environment:
  &default-back-environment
  # Database settings
  POSTGRES_DB: taiga
  POSTGRES_USER: taiga
  POSTGRES_PASSWORD: taiga
  POSTGRES_HOST: taiga-db
  # Taiga settings
  TAIGA_SECRET_KEY: "taiga-back-secret-key"
  TAIGA_SITES_SCHEME: "http"
  TAIGA_SITES_DOMAIN: "localhost:9000"
  TAIGA_SUBPATH: "" # "" or "/subpath"
  Email settings. Uncomment following lines and configure your SMTP server
  EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
  DEFAULT_FROM_EMAIL: "noreply@realmx.space"
  EMAIL_USE_TLS: "True"
  # EMAIL_USE_SSL: "False"
  EMAIL_HOST: "<SOMETHING>"
  EMAIL_PORT: 587
  EMAIL_HOST_USER: "noreply@realmx.space"
  EMAIL_HOST_PASSWORD: "<PASSWORD>"
  # Rabbitmq settings
  # Should be the same as in taiga-async-rabbitmq and taiga-events-rabbitmq
  RABBITMQ_USER: taiga
  RABBITMQ_PASS: taiga
  # Telemetry settings
  ENABLE_TELEMETRY: "True"

x-volumes:
  &default-back-volumes
  - taiga-static-data:/taiga-back/static
  - taiga-media-data:/taiga-back/media
  # - ./config.py:/taiga-back/settings/config.py


services:
  taiga-db:
    image: postgres:12.3
    environment:
      POSTGRES_DB: taiga
      POSTGRES_USER: taiga
      POSTGRES_PASSWORD: taiga
    volumes:
      - taiga-db-data:/var/lib/postgresql/data
    networks:
      - taiga

  taiga-back:
    image: taigaio/taiga-back:latest
    environment: *default-back-environment
    volumes: *default-back-volumes
    networks:
      - taiga
    depends_on:
      - taiga-db
      - taiga-events-rabbitmq
      - taiga-async-rabbitmq

  taiga-async:
    image: taigaio/taiga-back:latest
    entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
    environment: *default-back-environment
    volumes: *default-back-volumes
    networks:
      - taiga
    depends_on:
      - taiga-db
      - taiga-back
      - taiga-async-rabbitmq

  taiga-async-rabbitmq:
    image: rabbitmq:3.8-management-alpine
    environment:
      RABBITMQ_ERLANG_COOKIE: secret-erlang-cookie
      RABBITMQ_DEFAULT_USER: taiga
      RABBITMQ_DEFAULT_PASS: taiga
      RABBITMQ_DEFAULT_VHOST: taiga
    volumes:
      - taiga-async-rabbitmq-data:/var/lib/rabbitmq
    networks:
      - taiga

  taiga-front:
    image: taigaio/taiga-front:latest
    environment:
      TAIGA_URL: "http://localhost:9000"
      TAIGA_WEBSOCKETS_URL: "ws://localhost:9000"
      TAIGA_SUBPATH: "" # "" or "/subpath"
    networks:
      - taiga
    # volumes:
    #   - ./conf.json:/usr/share/nginx/html/conf.json

  taiga-events:
    image: taigaio/taiga-events:latest
    environment:
      RABBITMQ_USER: taiga
      RABBITMQ_PASS: taiga
      TAIGA_SECRET_KEY: "taiga-back-secret-key"
    networks:
      - taiga
    depends_on:
      - taiga-events-rabbitmq

  taiga-events-rabbitmq:
    image: rabbitmq:3.8-management-alpine
    environment:
      RABBITMQ_ERLANG_COOKIE: secret-erlang-cookie
      RABBITMQ_DEFAULT_USER: taiga
      RABBITMQ_DEFAULT_PASS: taiga
      RABBITMQ_DEFAULT_VHOST: taiga
    volumes:
      - taiga-events-rabbitmq-data:/var/lib/rabbitmq
    networks:
      - taiga

  taiga-protected:
    image: taigaio/taiga-protected:latest
    environment:
      MAX_AGE: 360
      SECRET_KEY: "taiga-back-secret-key"
    networks:
      - taiga

  taiga-gateway:
    image: nginx:1.19-alpine
    ports:
      - "9000:80"
    volumes:
      - ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
      - taiga-static-data:/taiga/static
      - taiga-media-data:/taiga/media
    networks:
      - taiga
    depends_on:
      - taiga-front
      - taiga-back
      - taiga-events

volumes:
  taiga-static-data:
  taiga-media-data:
  taiga-db-data:
  taiga-async-rabbitmq-data:
  taiga-events-rabbitmq-data:

networks:
  taiga:
@AmoghSaxena AmoghSaxena added the bug Something isn't working label May 3, 2022
@ghost
Copy link

ghost commented Jun 22, 2022

Same problem there and I am sure the EMAIL setting is correct.

When I try to sent a test email with the command "./taiga-manage.sh sendtestemail" it gives me the message "If you're reading this, it was successful." but nothig was successful.

With the command "./taiga-manage.sh check --deploy" I get the following:

`+ exec docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage check --deploy
Creating taiga-docker_taiga-manage_run ... done
System check identified some issues:

WARNINGS:
?: (security.W001) You do not have 'django.middleware.security.SecurityMiddleware' in your MIDDLEWARE so the SECURE_HSTS_SECONDS, SECURE_CONTENT_TYPE_NOSNIFF, SECURE_BROWSER_XSS_FILTER, and SECURE_SSL_REDIRECT settings will have no effect.
?: (security.W003) You don't appear to be using Django's built-in cross-site request forgery protection via the middleware ('django.middleware.csrf.CsrfViewMiddleware' is not in your MIDDLEWARE). Enabling the middleware is the safest approach to ensure you don't leave any holes.
?: (security.W009) Your SECRET_KEY has less than 50 characters or less than 5 unique characters. Please generate a long and random SECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack.
?: (security.W019) You have 'django.middleware.clickjacking.XFrameOptionsMiddleware' in your MIDDLEWARE, but X_FRAME_OPTIONS is not set to 'DENY'. The default is 'SAMEORIGIN', but unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to 'DENY'.

System check identified 4 issues (0 silenced).`

Any support? It is very annoying...

@yoelvd
Copy link

yoelvd commented Sep 24, 2022

I have the same issue, using docker image taigaio/taiga-back:latest. I set proper (already tested with another app) email settings inside docker-compose.yml and yet no email got sent.

@George-Nat
Copy link

+1

1 similar comment
@SubZr0
Copy link

SubZr0 commented Dec 12, 2022

+1

@msiebke
Copy link

msiebke commented Jan 23, 2023

+1
python manage.py sendtestemail example@domain.com works fine, but notifications dont work at all.

@daniel-herrero
Copy link
Contributor

Hi @AmoghSaxena ,

After all your related inquiries, the first thing I did is to discard a real bug while sending emails in Taiga.

In order to achieve this, I have downloaded the latests published images for the stable branch (pruning the older ones), and I tried three different SMTP server configurations to validate it (AWS, Gmail and Mailtrap).  
I can assure you that Taiga (in the 30-mins setup) is able to send emails with a proper configuration.

For documentation purposes, in order to help others, I left here the final working configurations I used in my trials:

#  MAILTRAP
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
DEFAULT_FROM_EMAIL: "no-reply@taiga.io"
EMAIL_USE_TLS: "True"
EMAIL_USE_SSL: "False"
EMAIL_HOST: "sandbox.smtp.mailtrap.io"
EMAIL_PORT: 587
EMAIL_HOST_USER: "6032xxx"
EMAIL_HOST_PASSWORD: "cb8xxx"

#  GMAIL
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
DEFAULT_FROM_EMAIL: "no-reply@example.com"
EMAIL_USE_TLS: "True"
EMAIL_USE_SSL: "False"
EMAIL_HOST: "smtp.gmail.com"
EMAIL_PORT: 587
EMAIL_HOST_USER: "daniel.herrero@kaleidos.net"
EMAIL_HOST_PASSWORD: "qgfxxx" (Google App password)

#  AWS
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" 
DEFAULT_FROM_EMAIL: "no-reply@taiga.io"
EMAIL_USE_TLS: "True"
EMAIL_USE_SSL: "False"
EMAIL_HOST: "xxx.amazonaws.com"
EMAIL_PORT: 587
EMAIL_HOST_USER: "AKxxx"
EMAIL_HOST_PASSWORD: "BFtxxx"

Discarding it's a bug, to trace your particular problem we would require more logs in order to offer you help.

Apart from the email configuration itself in the docker-compose.yml file (as you have already done), the most important clue is offered by the execution logs given by the 'taiga-back' service.

Can you provide us both the logs when Taiga starts (to verify every involved service has started properly), and the logs after you attempt to send a mail (for example when inviting a new member to join a project) ?

NOTE: You can start Taiga using docker-compose up instead of the ./launch-all.sh script to verify the logs in real-time.

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants