# Taiga on Docker, email not working

**URL:** <https://community.taiga.io/t/taiga-on-docker-email-not-working/2600>\
**Category:** Self hosted Taiga\
**Tags:** docker\
**Created:** [February 6, 2024, 7:37pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600 "2024-02-06T19:37:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adispy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/adispy/32/2102_2.png) [@adispy](https://community.taiga.io/u/adispy)\
**Post date:** [February 6, 2024, 7:37pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/1 "2024-02-06T19:37:32Z")

</div>

Hello people,  
I just did a fresh install of Taiga on my Docker host and after a few issues I managed to get it to work but no matter what, the email is not working.

Following the email configurations from the docs [Install Taiga in Production](https://docs.taiga.io/setup-production.html#setup-prod-with-docker) I put the email configs in the env settings of Portainer.

 ![2024-02-06_21-33-16](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/2/2aca136f802a26825e6fe60925d7278b2e658fe2.png)

Any idea?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [February 6, 2024, 7:56pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/2 "2024-02-06T19:56:19Z")

</div>

Hi @adispy

According to your screenshot, you are using `console` as EMAIL\_BACKNED so emails are being printed through the console (along with the rest of the logs).  
Change it to `smtp` if you want to send via smtp server.

I hope this can help

Best regards

---

<div class="post-metadata">

**Author:** ![adispy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/adispy/32/2102_2.png) [@adispy](https://community.taiga.io/u/adispy)\
**Post date:** [February 6, 2024, 8:27pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/3 "2024-02-06T20:27:27Z")

</div>

I have tired both, smtp and console and still not working. This was the last try when I captured the screen.

Are there any logs somewhere? If so, in which of the taiga containers?

---

<div class="post-metadata">

**Author:** ![adispy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/adispy/32/2102_2.png) [@adispy](https://community.taiga.io/u/adispy)\
**Post date:** [February 7, 2024, 8:51am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/4 "2024-02-07T08:51:06Z")

</div>

Anyone?  
I looked out on the internet but can’t find any valid answer and looks like there are a lot of email issues.

Do I need a SMTP agent installed on the docker host?

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [February 7, 2024, 10:27am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/5 "2024-02-07T10:27:33Z")

</div>

Hi @adispy

Taiga use the command email libs from python (specifically the implementation offered by Django) so it is something that is highly proven so errors are usually related to finding the appropriate values for configuration parameters.

Something that would be great is to have a command in taiga to test the SMTP connection with the server. But there isn’t. There is a command to send emails that is used to test all the emails in the application. But you need to load the sample data first.

```auto
docker compose exec taiga-back python manage.py sample_data
docker compose exec taiga-back python manage.py test_emails my_email@email.com

```

The first command creates example users and projects on the platform and the second sends an example of each email to the indicated email address. This way you can prove that the sending is done correctly.

There is another option, using the python shell.

```auto
docker compose exec taiga-back python manage.py shell

```

And type

```python
from django.core.mail import send_mail
send_mail("subject", "body", "from@email.com", ["to@email.com"])

```

These two methods should show you the connection error traces on the screen.

On the other hand, to see the logs of the email sending in the platform you should review the `taiga-back` and `taiga-async` service (the emails are sent from an asynchronous task soemtimes).

This is an example error after an invitation has been sent:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/7/7f997eb5a88b585a3b2fef8bfcce620704e19240.jpeg)

I hope this info can help you.

Best regards

---

<div class="post-metadata">

**Author:** ![adispy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/adispy/32/2102_2.png) [@adispy](https://community.taiga.io/u/adispy)\
**Post date:** [February 7, 2024, 4:44pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/6 "2024-02-07T16:44:46Z")

</div>

Hi David,  
Thank you for your patience, but where can I get that **sample\_data** file because I am getting the following error message:

_no configuration file provided: not found_

Thanks,

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [February 7, 2024, 5:06pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/7 "2024-02-07T17:06:30Z")

</div>

sample\_data is not a file, is a command

```auto
docker compose exec taiga-back python manage.py sample_data

```

Execute the comand `python manage.py sample_data` inside the container `taiga-back` (the command takes a few minutes)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/b/b8bceb9b2a41e29a21420504f97179fde275dc9c.jpeg)

---

<div class="post-metadata">

**Author:** ![adispy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/adispy/32/2102_2.png) [@adispy](https://community.taiga.io/u/adispy)\
**Post date:** [February 7, 2024, 5:23pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/8 "2024-02-07T17:23:51Z")

</div>

Tried it, but still does not work. It cannot find python and trying to install it does’n work either.

Also, in the Docker host I browse to the volume of taiga-back and still not working, same error as posted previous.

 ![2024-02-07_19-15-34](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/4/4c23a6f838efe540ab769c85370df7b1d4f806c5.png)

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [February 7, 2024, 6:31pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/9 "2024-02-07T18:31:10Z")

</div>

I run the command outside de containers (from the taiga-docker directory).

But I don’t understant why you have taiga-back code inside /srv/taiga/back. It should be in /taiga-back

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/7/70447c16aff4c0e7de9ab9a12cc233bcb5b682bc.jpeg)

(I’m so sorry, but it’s difficult for me to indicate the steps you need to follow if you use an environment other than the one described in the documentation. I don’t use Portainer nor have I tried installing taiga there)

---

<div class="post-metadata">

**Author:** ![Khyretos](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/khyretos/32/1573_2.png) [@Khyretos](https://community.taiga.io/u/Khyretos)\
**Post date:** [May 6, 2024, 5:16pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/10 "2024-05-06T17:16:35Z")

</div>

Hey, i am trying to setup SMTP as well but i cannot get it to work for the life of me.

i followed your instructions and these are the outputs:

**Results with TLS:**  
command:

```auto
python manage.py test_emails kees.rodriguez@gmail.com

```

result:

```auto
Traceback (most recent call last):
  File "/taiga-back/manage.py", line 17, in <module>
    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 48, in handle
    email.send()
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
                       ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 69, in open
    self.connection.login(self.username, self.password)
  File "/usr/local/lib/python3.11/smtplib.py", line 716, in login
    raise SMTPNotSupportedError(
smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.

```

command:

```auto
from django.core.mail import send_mail
send_mail("subject", "body", "kreativekompas@gmail.com", ["kees.rodriguez@gmail.com"])

```

result:

```auto
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/ __init__.py", line 61, in send_mail
    return mail.send()
           ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
                       ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 69, in open
    self.connection.login(self.username, self.password)
  File "/usr/local/lib/python3.11/smtplib.py", line 716, in login
    raise SMTPNotSupportedError(
smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.

```

**Results with SSL:**

command:

```auto
python manage.py test_emails kees.rodriguez@gmail.com

```

result:

```auto
Traceback (most recent call last):
  File "/taiga-back/manage.py", line 17, in <module>
    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 48, in handle
    email.send()
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
                       ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 62, in open
    self.connection = self.connection_class(self.host, self.port, **connection_params)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 343, in connect
    (code, msg) = self.getreply()
                  ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 405, in getreply
    raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed

```

command:

```auto
from django.core.mail import send_mail
send_mail("subject", "body", "kreativekompas@gmail.com", ["kees.rodriguez@gmail.com"])

```

result:

```auto
send_mail("subject","body","kreativekompas@gmail.com",["kees.rodriguez@gmail.com"])
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/ __init__.py", line 61, in send_mail
    return mail.send()
           ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
                       ^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 62, in open
    self.connection = self.connection_class(self.host, self.port, **connection_params)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 343, in connect
    (code, msg) = self.getreply()
                  ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/smtplib.py", line 405, in getreply
    raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed

```

i use the settings provided from google: [Send email from a printer, scanner, or app - Google Workspace Admin Help](https://support.google.com/a/answer/176600?hl=en)

and it works with other apps.

this is what is in my .env file:

```auto
# Taiga's SMTP settings - Variables to send Taiga's emails to the users
EMAIL_BACKEND=smtp # use an SMTP server or display the emails in the console (either "smtp" or "console")
EMAIL_HOST=smtp.gmail.com # SMTP server address
EMAIL_PORT=587 # default SMTP port
EMAIL_HOST_USER=kreativekompas@gmail.com # user to connect the SMTP server
EMAIL_HOST_PASSWORD=PASSWORD # SMTP user's password
EMAIL_DEFAULT_FROM=kreativekompas@gmail.com # default email address for the automated emails
# 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

```

console works fine but smtp does not do anything. or i dont know if i have to rebuild the docker image from scratch with these settings to make it work.

anybody has an idea?

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [May 6, 2024, 7:30pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/11 "2024-05-06T19:30:13Z")

</div>

@Khyretos use `True` or `False` (with the first letter in uppercase) instead of `true` or `false` and try it again.

---

<div class="post-metadata">

**Author:** ![Khyretos](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/khyretos/32/1573_2.png) [@Khyretos](https://community.taiga.io/u/Khyretos)\
**Post date:** [May 7, 2024, 4:52am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/12 "2024-05-07T04:52:37Z")

</div>

It seems to work now but i get this strange error. that it tries to send a mail to [example@example.com](mailto:example@example.com)

for example i implemented OIDC and it works but not flawelessly because when i register a user it fails first when sending a mail to [example@example.com](mailto:example@example.com) and then it sends a mail to the user. the user can then log in correctly.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/7/783d3d48bd8b4564a403d927c36ad63d98296829.png)

is there a way to check or edit existing user? i do have to admit i have yet to create a superuser. i do not know if that is required or not. but to me it looks like somewhere in the smtp settings it is taking [example@example.com](mailto:example@example.com) as some kind of admin or something.

---

<div class="post-metadata">

**Author:** ![farid](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farid](https://community.taiga.io/u/farid)\
**Post date:** [October 6, 2024, 8:25am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/13 "2024-10-06T08:25:41Z")

</div>

```auto
# Taiga's SMTP settings - Variables to send Taiga's emails to the users
EMAIL_BACKEND='smtp' # use an SMTP server or display the emails in the console (either "smtp" or "console")
EMAIL_HOST='smtppro.zoho.com' # SMTP server address
EMAIL_PORT=587 # default SMTP port
EMAIL_HOST_USER='notifications@mycompany.com' # user to connect the SMTP server
EMAIL_HOST_PASSWORD='MYEMAILPASS'
EMAIL_DEFAULT_FROM='notifications@mycompany.com' # default email address for the automated emails
# 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

```

This is the .env file config, but everytime I try to send a new member invite, it doesn’t work, the network tab gives me {“error”: “Server application error”}

When I try `./taiga-manage.sh test_emails myemail@gmail.com`

```auto
#####
                <a href="//None/user-settings/mail-notifications" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Configure email notifications or unsubscribe</a>
                 • 
                <a href="https://tree.taiga.io/support/" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Taiga Support</a>
                 • 
                <a href="mailto:support@taiga.io" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Contact us</a>
                
            
        </td>
        
            <td valign="middle" class="social-links" style='-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; color:#f5f5f5; font-family:"Open Sans", Arial, Helvetica; font-size:10px; line-height:150%; padding-bottom:15px; padding-left:20px; padding-right:17px; padding-top:15px; vertical-align:middle; text-align:right' align="right">
                <a href="https://twitter.com/taigaio" title="Follow us on Twitter" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#9dce0a; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-twitter.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
                <a href="https://github.com/taigaio" title="Get the code on GitHub" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#9dce0a; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-github.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
                <a href="https://taiga.io" title="Visit our website" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-web.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
            </td>
        
    </tr>
</table>
<!-- // END FOOTER -->
                                </td>
                            </tr>
                        </table>
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>

--===============7177434540594643220==--

-------------------------------------------------------------------------------

Traceback (most recent call last):
  File "/taiga-back/manage.py", line 17, in <module>
    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'

```

Any idea how to solve this?

I tried changing the port to 465/587 and SSL/TLS true / false, vise versa.

---

<div class="post-metadata">

**Author:** ![Charlie](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Charlie](https://community.taiga.io/u/Charlie)\
**Post date:** [October 7, 2024, 10:24am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/14 "2024-10-07T10:24:08Z")

</div>

Hi there!

I’m checking the code for the [test\_emails command](https://github.com/taigaio/taiga-back/blob/main/taiga/base/management/commands/test_emails.py).

Based on your error, you should have at least received an example registration email, is that correct?

The error seems to indicate as well that there is no membership on any project on your database. Have you created any project yet? If you have, you should at least have your own membership on a project.

Best regards!

---

<div class="post-metadata">

**Author:** ![farid](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farid](https://community.taiga.io/u/farid)\
**Post date:** [October 7, 2024, 10:38am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/15 "2024-10-07T10:38:59Z")

</div>

Thanks for the reply

Yes, I should at least receive a test mail, I can’t really send new member invitation due to the mail failure I think

I do have a project and the user is already a member since I created that project!

---

<div class="post-metadata">

**Author:** ![Charlie](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Charlie](https://community.taiga.io/u/Charlie)\
**Post date:** [October 7, 2024, 10:58am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/16 "2024-10-07T10:58:05Z")

</div>

So, you did not receive the example registration email, right?

It appears that there is an email sent in console above your error. If that is the case, that could indicate that the environment variables have not been loaded and it’s using the default console smtp backend.

Please try doing `export $(cat .env) before launching ` ./taiga-manage.sh test\_emails myemail@gmail.com` and let me know if that helps or throws a different error.

Best regards!

---

<div class="post-metadata">

**Author:** ![farid](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farid](https://community.taiga.io/u/farid)\
**Post date:** [October 7, 2024, 11:03am UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/17 "2024-10-07T11:03:15Z")

</div>

```auto
root@Taiga-Project:~# cd taiga/
root@Taiga-Project:~/taiga# export $(cat .env)
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `"http"': not a valid identifier
-bash: export: `"https"': not a valid identifier
-bash: export: `(secured)': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `it'll': not a valid identifier
-bash: export: `(use': not a valid identifier
-bash: export: `""': not a valid identifier
-bash: export: `"/subpath")': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `(use': not a valid identifier
-bash: export: `"ws"': not a valid identifier
-bash: export: `"wss")': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Please,': not a valid identifier
-bash: export: `value!!': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `user's': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `(either': not a valid identifier
-bash: export: `"smtp"': not a valid identifier
-bash: export: `"console")': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `EMAIL_USE_TLS/EMAIL_USE_SSL': not a valid identifier
-bash: export: `(only': not a valid identifier
-bash: export: `True)': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `(secure)': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `(secure)': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `user's': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `(in': not a valid identifier
-bash: export: `seconds)': not a valid identifier
-bash: export: `#': not a valid identifier
-bash: export: `Taiga's': not a valid identifier
-bash: export: `-': not a valid identifier

```

And then when I run testmail command, same error

---

<div class="post-metadata">

**Author:** ![farid](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farid](https://community.taiga.io/u/farid)\
**Post date:** [October 7, 2024, 12:39pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/18 "2024-10-07T12:39:55Z")

</div>

I also made the same silly mistake which mentioned here

> [@SMTP on self hosted not working, connection itself works](https://community.taiga.io/t/smtp-on-self-hosted-not-working-connection-itself-works/3882):
>
> Hello The SMTP is not sending any e-mail. I tested the SMTP settings, login, credential, port on another system, and that is working well. I have and followed this exactly same setup: [GitHub - 6Ministers/taiga-io-docker-compose-for-projects: About Fast set-up Taiga Kanban for Business with Docker Compose](https://github.com/6Ministers/taiga-io-docker-compose-for-projects) How to debug this? Where to see (email) loggings? Thx for helping out! Kristof

---

<div class="post-metadata">

**Author:** ![Charlie](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Charlie](https://community.taiga.io/u/Charlie)\
**Post date:** [October 7, 2024, 12:50pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/19 "2024-10-07T12:50:19Z")

</div>

Hi there,

Yeah, sorry, I forgot about the comments. Still, it should have exported the rest of the variables. I tried with the console backend, and managed to make the command work by having a non-accepted invitation.

I’m not sure that this is an SMTP issue. Can you share what logs you get in Taiga backend when trying to invite someone?

---

<div class="post-metadata">

**Author:** ![farid](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farid](https://community.taiga.io/u/farid)\
**Post date:** [October 7, 2024, 1:48pm UTC](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600/20 "2024-10-07T13:48:38Z")

</div>

Since I rebuilt containers, it’s working fine now

[Next page](https://community.taiga.io/t/taiga-on-docker-email-not-working/2600.md?page=2)
