Open AmoghSaxena opened 2 years ago
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...
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.
+1
+1
+1
python manage.py sendtestemail example@domain.com
works fine, but notifications dont work at all.
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
# Taiga's SMTP settings - Variables to send Taiga's emails to the users
EMAIL_BACKEND=console # use an SMTP server or display the emails in the console (either "smtp" or "console")
EMAIL_HOST=smtp.timeweb.ru
EMAIL_PORT=587 # default SMTP port
EMAIL_HOST_USER=root # user to connect the SMTP server
EMAIL_HOST_PASSWORD= # SMTP user's password
EMAIL_DEFAULT_FROM=no-reply@ilyazheprog-taiga.ru
# EMAIL_USE_TLS/EMAIL_USE_SSL are mutually exclusive (only set one of those to True)
EMAIL_USE_TLS=True # use TLS (secure) connection with the SMTP server
EMAIL_USE_SSL=False # use implicit TLS (secure) connection with the SMTP server
root@jira:~/taiga-docker# ./taiga-manage.sh sendtestemail ilya_zhenetskij@vk.com
+ exec docker compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage sendtestemail ilya_zhenetskij@vk.com
WARN[0000] /root/taiga-docker/docker-compose.yml: `version` is obsolete
WARN[0000] /root/taiga-docker/docker-compose-inits.yml: `version` is obsolete
WARN[0000] Found orphan containers ([taiga-docker-penpot-frontend-1 taiga-docker-penpot-backend-1 taiga-docker-penpot-postgres-1 taiga-docker-penpot-exporter-1 taiga-docker-penpot-redis-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Creating 1/0
✔ Container taiga-docker-taiga-db-1 Running 0.0s
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Test email from 14afa356fb05 on 2024-06-07 05:51:01.355534+00:00
From: no-reply@ilyazheprog-taiga.ru
To: ilya_zhenetskij@vk.com
Date: Fri, 07 Jun 2024 05:51:01 -0000
Message-ID: <171773946135.1.636564675228602354@14afa356fb05>
If you're reading this, it was successful.
-------------------------------------------------------------------------------
root@jira:~/taiga-docker# . / taiga-manage.sh check --deploy
-bash: .: /: is a directory
root@jira:~/taiga-docker# . /taiga-manage.sh check --deploy
-bash: /taiga-manage.sh: No such file or directory
root@jira:~/taiga-docker# ./taiga-manage.sh check --deploy
+ exec docker compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage check --deploy
WARN[0000] /root/taiga-docker/docker-compose.yml: `version` is obsolete
WARN[0000] /root/taiga-docker/docker-compose-inits.yml: `version` is obsolete
WARN[0000] Found orphan containers ([taiga-docker-penpot-frontend-1 taiga-docker-penpot-backend-1 taiga-docker-penpot-postgres-1 taiga-docker-penpot-exporter-1 taiga-docker-penpot-redis-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Creating 1/0
✔ Container taiga-docker-taiga-db-1 Running 0.0s
System check identified some issues:
WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W009) Your SECRET_KEY has less than 50 characters, less than 5 unique characters, or it's prefixed with 'django-insecure-' indicating that it was generated automatically by Django. Please generate a long and random SECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack.
System check identified 3 issues (0 silenced).
Using the following documentation: Timeweb Email Settings
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