T
Twenty3w 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?
39 Replies
martmull
martmull3w 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
Neruu23w 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
martmull3w 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
Neruu23w ago
ooooooh. And how do I make sure my worker starts correctly? 😅
martmull
martmull3w ago
How do you start your app? You use docker-compose?
Neruu2
Neruu23w ago
yes with that compose.yaml : https://haste.kyvos.studio/acucehidak.bash
martmull
martmull3w ago
ok the worker service is missing
martmull
martmull3w 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
martmull3w ago
can you try that?
Neruu2
Neruu23w 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
martmull3w ago
all your pending emails will fire i warn you 😅
Neruu2
Neruu23w ago
haha ok
martmull
martmull3w ago
did not know that
Neruu2
Neruu23w ago
Coolify
Coolify
Here you can find the documentation for hosting Twenty with Coolify.
Neruu2
Neruu23w ago
(coolify's a pretty neat tool when coming to the self-hosting utilities)
martmull
martmull3w ago
cool very nice here is the docker install doc if you need -> https://twenty.com/developers/section/self-hosting/docker-compose
Neruu2
Neruu23w 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
martmull3w ago
thanks!
Neruu2
Neruu23w 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
Raph3w ago
don't you have docker logs?
Neruu2
Neruu23w 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
Raph3w 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
Raph3w ago
No description
Neruu2
Neruu23w ago
Yep but I'm not using google mail server 🙂 This is to setup the SMTP server
No description
Neruu2
Neruu23w 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
martmull3w 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
martmull2w ago
@Neruu2 did you manage to fix the issue?
Neruu2
Neruu22w 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
A4D4M6d ago
same issue, not able to send gmails even after adding all config vars in coolify
martmull
martmull6d ago
@A4D4M can you try that in order to check your worker is running properly?
A4D4M
A4D4M6d 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
martmull6d ago
Exactly, that means the worker service is not running So we should focus on that issue before looking at env variables config
A4D4M
A4D4M5d 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
ɃØĦɆᵾS5d ago
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
A4D4M5d 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
martmull5d ago
Hey @A4D4M , I am checking that
martmull
martmull5d 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
martmull5d 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
Want results from more Discord servers?
Add your server