Sending emails to smtp4dev
I'm trying to test emails with smtp4dev, logs appear about sent email but nothing appears in smtp4dev web page, here's what I did:
- worker is running from
npx nx start
- created new smtp4dev container using docker run --rm -it -p 8090:80 -p 2525:25 rnwood/smtp4dev
from docs
- uncommented necessary options in .env in twenty-server (all starting at EMAIL_ except for EMAIL_SMTP_USER and EMAIL_SMTP_PASSWORD)
- created new mailbox in smtp4dev for [email protected]
- sent forgot password and invitation email but got nothing
Am I missing something like another worker?17 Replies
Hey @ɃØĦɆᵾS
You did well
You need those env variable values
- [email protected]
- [email protected]
- EMAIL_FROM_NAME='John from YourDomain'
- EMAIL_DRIVER=smtp
- EMAIL_SMTP_HOST=localhost
- EMAIL_SMTP_PORT=2525
Can you check those?
You don't need to create a mailbox in
smtp4dev
Don't forget. You need to restart server and worker to take env variable changes into account!Here are my env variables, the only difference is EMAIL_DRIVER
I checked and the driver was the source of problem, thanks a lot @martmull, I'll update docs as this info is missing yet it's crucial for testing emails locally
ok great, ping me for a review, cheers
Hey Bob, do I need to restart the container after adding anything to .env?
Yes
for sending emails, what's the best way to test mail server after restarting the container?
Check docs, there are all information
Trying to create 1 Person, typed in First name and Last name using values "BitePa" and "So". I got an error.
Update Twenty https://github.com/twentyhq/twenty/issues/8662
GitHub
Can't create any record · Issue #8662 · twentyhq/twenty
Scenario: Log in Go to any records tab (e.g. People tab) Try to create a new record Actual: There's error in UI and also in logs while creating new records and preventing from creating Video Ex...
I followed the doc and used the 1 line install option 2 hours ago.
I guess the image is not updated yet?
You mean this? https://twenty.com/user-guide
Twenty - User Guide
Discover how to use Twenty CRM effectively with our detailed user guide. Explore ways to customize features, manage tasks, integrate emails, and navigate the system with ease.
https://twenty.com/developers/section/self-hosting/self-hosting-var#email-smtp-server-configuration-examples
Images have their releases, not sure when there'll be new release, you can pull image with latest tag to get fix but expect breaking changes
oh... can't try Twenty until there is a new proper image...
I tried to use "Change Password" function to test receiving email. Twenty UI says success, but my Postfix server has no log of Twenty attempting to connect and send email. There is no firewall between them. From Twenty server, I can send email and get it by using command line "mail -s"
[email protected]
[email protected]
EMAIL_FROM_NAME='Twenty Administrator'
EMAIL_DRIVER=smtp
EMAIL_SMTP_HOST='192.168.1.5'
EMAIL_SMTP_PORT=25
[email protected]
EMAIL_SMTP_PASSWORD=XXXXXX
Restarted the Docker container
?
From this guide https://twenty.com/developers/section/self-hosting/upgrade-guide#upgrade-guide I want to upgrade from 0.33.0 to 0.33.4 as shown here https://hub.docker.com/r/twentycrm/twenty/tags
docker ps shows 2 containers running twentycrm
when I try to docker exec bash I get OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown
how do I perform the actual upgrade command? please help
need to at least try 0.33.4 or I can't even create any new records in Twenty... making it completely useless
Pulled the "main" tag image, and boy it sure is bad! Upon reboot CPU is 100% for over 3mins and I still cannot ssh in. Don't know what it is doing...
Try
docker exec ... sh
instead of bash
. It may be the source container doesn't have BASH installed. Works for kubernetes containers