Connect ChronoSlice to an SMTP account so it can send invoices, reminders and receipts, and test it first with files.
ChronoSlice sends invoices, reminders, receipts and alerts through an SMTP account that you provide. This page shows the settings, the forms of the SMTP address, and how to test before you email a client.
What email is used for
- Invoices, with the PDF attached, and follow-ups on sent invoices.
- Reminders before and after an invoice's due date.
- Receipts when a client pays online.
- Alerts when a client's block of support hours runs low.
- Test emails that you send yourself.
Without email settings, ChronoSlice still works. You can make and download invoices, but the server can't send them. It says email is off in the log at start.
The settings
Add these to /etc/chronoslice/env, then restart the service.
CHRONOSLICE_SMTP_URL=smtps://USERNAME:[email protected]:465
CHRONOSLICE_MAIL_FROM="Your Studio <[email protected]>"
CHRONOSLICE_PUBLIC_URL=https://time.example.com
CHRONOSLICE_SMTP_URLsays how to reach your mail server. The forms are below.CHRONOSLICE_MAIL_FROMis the sender, as an address or asName <address>. Set it together with the SMTP address. If you set one without the other, the server won't start and saysSet CHRONOSLICE_MAIL_FROM too. Quotes around the value are optional.CHRONOSLICE_PUBLIC_URLis the address clients use to reach ChronoSlice. Each invoice email links to the invoice with it, so invoice emails can't be sent without it, and reminders aren't sent either.
sudo systemctl restart chronoslice
The forms of the SMTP address
| Address | What it does |
|---|---|
smtps://user:pass@host:465 |
Connects with TLS from the start. Use this when your provider offers port 465. |
smtp://user:pass@host:587?tls=required |
Connects on port 587 and requires STARTTLS. If the server doesn't offer it, sending fails. |
smtp://user:pass@host:587 |
No encryption. Don't use it over the internet. |
file:///folder |
Doesn't send anything. Writes each email as a file in the folder. For testing. |
[!WARNING] The plain
smtp://form without?tls=requiredsends everything, including your password, without encryption.
If the username or password has characters such as @, : or /, write them percent-encoded: @ is %40, : is %3A and / is %2F. With Resend, for example, the address looks like smtps://resend:[email protected]:465, sending from a domain you verified there.
Make mail arrive
Set up SPF and DKIM for the domain in CHRONOSLICE_MAIL_FROM at your mail provider. Without them, invoices are likely to land in spam.
Replies can go to a different address than the sender. In the web app, open Invoices, then Settings, and fill in Replies go to in the Email card. Leave it empty to use the sender address.
Test it
- Open Invoices, then Settings, and find the Email card. It should say This server sends email, with the sender address and the address that emails link to. If it says This server can't send email yet, it lists the settings that are missing.
- Under Send a test email, leave the address empty to send to yourself, or type another one, and press Send test.
- Check that the email arrives, and that it isn't in spam.
Invoices, then Emails, lists the last 200 emails ChronoSlice sent or tried to send, with the reason for any that failed.
Test without sending anything
To see what ChronoSlice would send without a mail account, point the address at a folder:
CHRONOSLICE_SMTP_URL=file:///var/lib/chronoslice/mail
CHRONOSLICE_MAIL_FROM="Your Studio <[email protected]>"
ChronoSlice creates the folder if it's missing, and writes each email there as a file. The folder must be one the service can write to. /var/lib/chronoslice is, with the unit file from Install on Linux. Switch to a real SMTP address before you email a client.
When a send fails
- An email that fails is recorded with its error under Invoices, then Emails, and on the invoice itself, which shows a warning.
- A recurring invoice whose email fails is tried again every hour, up to 5 tries in all.
- Other problems, and how to fix them, are in Troubleshooting.
The settings for reminders, receipts and attached files are in the same Email card. See Reminders and notifications.
Still stuck?
Send us a request: it goes to the people who build ChronoSlice, and the reply comes by email. Include your ChronoSlice version (Settings › Licence shows it) and what you tried.