Inviting Members

Hello, I receive the following error when I attempt to invite new members:

Headers:

Request URL:
http://mydomain/api/v1/memberships/bulk_create
Request Method: POST
Status Code: 500 Internal Server Error
Remote Address: ***
Referrer Policy: strict-origin-when-cross-origin

Payload:
{“project_id”:1,“bulk_memberships”:[{“role_id”:5,“username”:“…*”}]}

I have the following SMPT variables set in the .env file:

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=email-smtp.us-west-2.amazonaws.com # SMTP server address
EMAIL_PORT=587 # default SMTP port
EMAIL_HOST_USER=*** # user to connect the SMTP server
EMAIL_HOST_PASSWORD=*** # SMTP user’s password
EMAIL_DEFAULT_FROM=email@domain # 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

Any thoughts? As a work around for my team members, I went ahead and enabled the following public registration as specified in the 30 min setup:

Add to &default-back-environment environments

PUBLIC_REGISTER_ENABLED: "True"

Add to taiga-front service environments

PUBLIC_REGISTER_ENABLED: "true"

Hi @James,

Welcome to the community and let’s see if we can help you.

The setting data you’ve shared seems to be right.

Can you execute docker compose logs -f to monitor the docker services’s logs and repeat the same operation? Please post it here what you get in the console, that should be the 500 error.

Just with that, It can be a problem with the async taks execution, the smtp configuration (when trying to send the registration emails), or even a bug.

I guess you don’t get any messaged delivered when trying to add members, is it right?

Does your other team members get any email while trying to register by itselves? This would discard the smtp configuration part.

Thanks in advance

Hi Daniel,

According to the logs after attempting to send an invitation states the following:
taiga-docker-taiga-back-1 | smtplib.SMTPAuthenticationError: (535, b’Authentication Credentials Invalid’).

However, after confirming that we were utilizing the correct generated credentials we happen to research a bit and stubbled upon an article that states AWS SMTP generates special characters in its credentials and that the credentials have to be url encoded and then provided in the configuration.

Aside from this discovery, any additional recommendations? Thanks!

Hi @James,

That discard a task execution problem and reduce the problem to a validation with your Amazon SES server, as you suggested.

I’ve never done it, but I’m almost sure you can use AWS SMTP in Taiga to send emails.

I recommend you to investigate more on the Amazon SES side, validating the EMAIL account you’ve set in Taiga have enough priviledges and the credentials are valid to log in into the Amazon Server.

I’m afraid I can’t offer more help at this point. Perhaps some other folk have managed to use Amazon SES in Taiga and can offer more help.

Good luck and don’t forget to post here your conclusion!

Daniel,

Excuse the late reply, the issue has been resolved. It appears that you must generate the smtp credential as instructed here:

The article states the following which is key to understand as to why generating the credential such as the py script won’t work correctly:

Note: The credentials for the Amazon SES SMTP interface are different from the access keys that you create using AWS Identity and Access Management (IAM) for an SMTP user.

I’d also like to mention that it does not need to be URL encoded if done this way and should work fine.

I’m really glad to hear that!
Thank you for sharing your solution, I’ll help others for sure!

Hello,
I was unable to invite the user, so I have made the following change to email setting and it works for me
Note: SSL typically uses port 465, while TLS uses port 587. If you have EMAIL_USE_SSL = True, you should be using port 465, not 587.

Email settings. Uncomment following lines and configure your SMTP server

EMAIL_BACKEND: “django.core.mail.backends.smtp.EmailBackend”
DEFAULT_FROM_EMAIL: “track@vayavyalabs.com
#EMAIL_USE_TLS: “True”
EMAIL_USE_SSL: “True”
EMAIL_HOST: “smtp.gmail.com
EMAIL_PORT: 465
EMAIL_HOST_USER: “add your email_address”
EMAIL_HOST_PASSWORD: “password”