T
Twentyā€¢2mo ago
Neruu2

No system mail sent

I'm self-hosting Twenty with the Coolify's template. Everything work nicely BUT the system emails. No matter what I do, it seems that the system never sends any emails (eg: invitation or forgot password). Here is my docker-compose.yaml: https://haste.kyvos.studio/acucehidak.bash I've seen the issue regarding the EMAIL_DRIVER and the possibility to set either to logger or smtp but neither of these fix my issue. In addition, impossible to see any logs (agin, both EMAIL_DRIVER value have bee tested). Anyone facing similar issues?
42 Replies
martmull
martmullā€¢2mo ago
Did you look at https://twenty.com/developers/section/self-hosting/self-hosting-var#email ? you have some configuration example with Gmail or Office365 smtp server configuration with some link to their doc Tell me if you struggle with that
Neruu2
Neruu2OPā€¢2mo ago
I assumed any SMTP configuration could work but maybe only SMTP configuration from Google and Microsoft are valid? I currently using OVH smtp server (pro3.mail.ovh.net) with same working settings (that I use on other tools like cal.com for example). But maybe this is not allowed? And shouldn't I be able to see log at least? In my case I have no log at all when trying to send email (forgotPassword or invitation). This is why I think I did something wrong šŸ˜
martmull
martmullā€¢2mo ago
oh ok i see OVH is not not allowed šŸ¤— so no pb with that it should work I think the issue is that your worker is not running The worker runs the jobs, and emails are sent by jobs
Neruu2
Neruu2OPā€¢2mo ago
ooooooh. And how do I make sure my worker starts correctly? šŸ˜…
martmull
martmullā€¢2mo ago
How do you start your app? You use docker-compose?
Neruu2
Neruu2OPā€¢2mo ago
yes with that compose.yaml : https://haste.kyvos.studio/acucehidak.bash
martmull
martmullā€¢2mo ago
ok the worker service is missing
martmull
martmullā€¢2mo ago
here is the docker-compose.yml we have on packages/twenty-docker/docker-compose.yml https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/docker-compose.yml
GitHub
twenty/packages/twenty-docker/docker-compose.yml at main Ā· twentyhq...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty
martmull
martmullā€¢2mo ago
can you try that?
Neruu2
Neruu2OPā€¢2mo ago
Awesome thanks ! I'll try it tonight, and if successfull I'll update the coolify's template (idk if you are aware that twenty is offered as template on coolify instances)
martmull
martmullā€¢2mo ago
all your pending emails will fire i warn you šŸ˜…
Neruu2
Neruu2OPā€¢2mo ago
haha ok
martmull
martmullā€¢2mo ago
did not know that
Neruu2
Neruu2OPā€¢2mo ago
Coolify
Coolify
Here you can find the documentation for hosting Twenty with Coolify.
Neruu2
Neruu2OPā€¢2mo ago
(coolify's a pretty neat tool when coming to the self-hosting utilities)
martmull
martmullā€¢2mo ago
cool very nice here is the docker install doc if you need -> https://twenty.com/developers/section/self-hosting/docker-compose
Neruu2
Neruu2OPā€¢2mo ago
Happy to present the soft (what I know of) if keen. I've seen your OSS friends page, I believe you are on the right way there šŸ™‚
martmull
martmullā€¢2mo ago
thanks!
Neruu2
Neruu2OPā€¢2mo ago
Thank you ! šŸ˜‰ Some questions regarding the docker-compose.yml. I see that service
change-vol-ownership:
image: ubuntu
user: root
volumes:
- server-local-data:/tmp/server-local-data
- docker-data:/tmp/docker-data
command: >
bash -c "
chown -R 1000:1000 /tmp/server-local-data
&& chown -R 1000:1000 /tmp/docker-data"
change-vol-ownership:
image: ubuntu
user: root
volumes:
- server-local-data:/tmp/server-local-data
- docker-data:/tmp/docker-data
command: >
bash -c "
chown -R 1000:1000 /tmp/server-local-data
&& chown -R 1000:1000 /tmp/docker-data"
that is required in the dependances:
depends_on:
change-vol-ownership:
condition: service_completed_successfully
depends_on:
change-vol-ownership:
condition: service_completed_successfully
Again, I'm deploying Twenty from the template service in Coolify, and this service does not show. It seems many have already deployed from that template (from what I've read in the support) and nobody seemed to be missing it. I guess it is related to the local storage manipulation? Is it mandatory for local storage? Is it for s3 storage? Is there a healthcheck I can perform on the worker? I've got it running but I have no other logs than the [InstanceLoader] logs at the moment. When I try to send an email with the system (invitaion or forgot password) I can't find any log anywhere (but the application make the success toast "email sent")
Raph
Raphā€¢2mo ago
don't you have docker logs?
Neruu2
Neruu2OPā€¢2mo ago
Yes I do, but even in the worker I had only [InstanceLoader] logs (like this https://haste.kyvos.studio/iyuyilufus.less) I don't know what happen (maybe worker takes some time?) but today it works fine (I mean, at leat I have logs). https://haste.kyvos.studio/ayixekabov.php-template I still don't have emails (they never arrive to my mailbox), but at leat the worker seems to be working?
Raph
Raphā€¢2mo ago
I had a problem with the emails too. @charles helped me sort it out. Study the env variables really close for Google. The slightly changes in the app. Iā€™ll see if I can dig up the difference.
Raph
Raphā€¢2mo ago
No description
Neruu2
Neruu2OPā€¢2mo ago
Yep but I'm not using google mail server šŸ™‚ This is to setup the SMTP server
No description
Neruu2
Neruu2OPā€¢2mo ago
So update! I've tried to delte/reinstall the entire setup. Nothing. I've tried to add the SMTP vars to the worker service as well. Nothing... I'll let it cool for tonight... but I must say that this is quite frustrating... Recap of my setup right now: I've added the compose with the worker. I've set the EMAIL_DRIVE to logger (tried both logger and smtp) I've added the SMTP vars to the worker
martmull
martmullā€¢2mo ago
Hey @Neruu2, I think before focusing on env variables, we should make sure that your worker service is running Can you try to setup a webhook on your instance with a webhook test service like https://webhook-test.com/ and check that you receive events? Webhooks work with the worker service so it will test the worker service state
Webhook Tester | Webhook Testing Tool
Experience instant, free access to a unique URL and email address at webhook-test.com. Test, inspect, and automate incoming HTTP requests effortlessly with our powerful tools, including a visual workflow editor and customizable scripts. Streamline your testing process and enhance your automation
martmull
martmullā€¢2mo ago
@Neruu2 did you manage to fix the issue?
Neruu2
Neruu2OPā€¢2mo ago
@martmull sorry for the delayed answer. I'm just noticing your answer now. I will definitely look into it and get back to you soon. Thanks a lot for your time !
A4D4M
A4D4Mā€¢2mo ago
same issue, not able to send gmails even after adding all config vars in coolify
martmull
martmullā€¢2mo ago
@A4D4M can you try that in order to check your worker is running properly?
A4D4M
A4D4Mā€¢2mo ago
I am not sure if i did it correctly, I have added the webhook test url from the website you mentioned to the webhooks section in twenty settings, and tried performing some mail actions, created few people,companies, but looks like none of them created a request in webhook test page. is that what you meant?
martmull
martmullā€¢2mo ago
Exactly, that means the worker service is not running So we should focus on that issue before looking at env variables config
A4D4M
A4D4Mā€¢2mo ago
ha thanks, i will try to avoid coolify template and i will use the One-line script to selfhost. The one line script has the same issues, nothing comes out in webhooks
ÉƒĆ˜Ä¦É†įµ¾S
GitHub
Webhooks not working Ā· Issue #7751 Ā· twentyhq/twenty
Reproducible on main after pulling newest changes Scenario: Log in Go to Settings and toggle "Advanced settings" Go to API & Webhooks Add new webhook or use existing one Check details...
A4D4M
A4D4Mā€¢2mo ago
i tried webhooks just to see if the woker service is running, but i am not able to figure out now. let me know if anything can be done to solve this, i dont have any errors in logs, also the /healthz seems OK
martmull
martmullā€¢2mo ago
Hey @A4D4M , I am checking that
martmull
martmullā€¢2mo ago
Webhooks are currently displaying an error, but it does not impact the webhook functionnality Also, update events webhook triggering was broken, fixed right now here https://github.com/twentyhq/twenty/pull/7814
martmull
martmullā€¢2mo ago
Another idea, what is your MESSAGE_QUEUE_TYPE env variable? Or is it set? If not set or set to bull-mq, you will need redis running in order to run the queue system if you don't have redis, or don't know if you have redis, just set MESSAGE_QUEUE_TYPE=pg-boss it will use the postgresql database to create the queue system then, check if webhooks are working
A4D4M
A4D4Mā€¢4w ago
hey after this new update i am receiving the webhooks, but now not sure how to check if have that variable or not . I only have a a docker compose.yml file and i can't see that variable inside that. also earlier in coolify i knew where to add those envs for mails , google auth etc, but now with once line script not sure where i can add my env vars for that
ÉƒĆ˜Ä¦É†įµ¾S
Command for worker for webhooks was added here https://github.com/twentyhq/twenty/issues/7751
GitHub
Webhooks not working Ā· Issue #7751 Ā· twentyhq/twenty
Reproducible on main after pulling newest changes Scenario: Log in Go to Settings and toggle "Advanced settings" Go to API & Webhooks Add new webhook or use existing one Check details...
A4D4M
A4D4Mā€¢4w ago
webhooks are working for me right now ah there was one .env file in that folder, got it, @martmull No, there is no MESSAGE_QUEUE_TYPE variable in it. I have add MESSAGE_QUEUE_TYPE=pg-boss in env i will add the mail env once more and check. will update here later
Want results from more Discord servers?
Add your server