SelfHosting - Email Invite Issue
Background - I have hosted twenty on AWS. I have configured a rds postgres instance to be used as DB instead of the one in docker volume. The application is hosted well and I can access the application on http using ec2 instance public ip. so far good. I can Also see db updates and schema creation working well.
Problem - I need to add more people to workspace and need to send email invites. The receiver is not receiving any email.
I am using aws ses and currently using email option in sandbox and have also verified the sender and receiver emails in aws. I have added the below keys in .env file
EMAIL_DRIVER=smtp
EMAIL_SMTP_HOST=email-smtp.ap-southeast-1.amazonaws.com
EMAIL_SMTP_PORT=587
EMAIL_SMTP_USER=xxx
EMAIL_SMTP_PASSWORD=xxx
[email protected]
EMAIL_FROM_NAME=xxxCRM
when I check logs( docker logs twenty-worker-1) It shows message like
[Nest] 34 - 05/24/2025, 9:45:32 AM LOG [LoggerDriver] Sent email to: [email protected]
with full email structure.
I am not sure where id the problem. Anyhelp or insight is much appreciated
4 Replies
hi Twenty team! can anyone assist on the issue? ^
I have this same issue btw
Hey @azmat are you sure your server/worker containers have computed the new env vars ? Could you please exec
echo $EMAIL_SMTP_USER
in one or both of your containers ?@prastoin I resolved the issue. Here is what was wrong . I had set the variables in .env file but missed the ones in docker-compose.
@nogeo I did this to sort my issue. let me know if that helps
so we have to add the same set of variables in the docker compose.
EMAIL_FROM_ADDRESS: ${EMAIL_FROM_ADDRESS}
EMAIL_FROM_NAME: ${EMAIL_FROM_NAME}
EMAIL_SYSTEM_ADDRESS: ${EMAIL_SYSTEM_ADDRESS}
EMAIL_DRIVER: ${EMAIL_DRIVER}
EMAIL_SMTP_HOST: ${EMAIL_SMTP_HOST}
EMAIL_SMTP_PORT: ${EMAIL_SMTP_PORT}
EMAIL_SMTP_USER: ${EMAIL_SMTP_USER}
EMAIL_SMTP_PASSWORD: ${EMAIL_SMTP_PASSWORD}