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
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
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 š
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
ooooooh.
And how do I make sure my worker starts correctly? š
How do you start your app?
You use docker-compose?
yes
with that compose.yaml :
https://haste.kyvos.studio/acucehidak.bash
ok
the worker service is missing
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
can you try that?
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)
all your pending emails will fire i warn you š
haha ok
did not know that
(coolify's a pretty neat tool when coming to the self-hosting utilities)
cool very nice
here is the docker install doc if you need -> https://twenty.com/developers/section/self-hosting/docker-compose
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 š
thanks!
Thank you ! š
Some questions regarding the docker-compose.yml.
I see that service
that is required in the dependances:
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")don't you have docker logs?
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?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.
Yep but I'm not using google mail server š
This is to setup the SMTP server
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
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
@Neruu2 did you manage to fix the issue?
@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 !
same issue, not able to send gmails even after adding all config vars in coolify
@A4D4M can you try that in order to check your worker is running properly?
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?
Exactly, that means the worker service is not running
So we should focus on that issue before looking at env variables config
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
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...
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
Hey @A4D4M , I am checking that
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
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 workinghey 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
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...
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