Content Server: Setting Up Mail
The content server sends invitations, password links and notices to curators by mail. For that it needs a mail server (SMTP). Without one, everything else keeps working: the page shows invitation links for copying, and Settings → Mail server says "No mail server set up".
The values are not set in the web interface but as environment variables in the Docker stack. This page is for whoever runs the server.
The variables
| Variable | Required | Meaning | Example |
|---|---|---|---|
CON_SMTP_HOST |
yes | Address of the mail server | smtp.gmail.com |
CON_SMTP_FROM |
yes | Sender address of the mails | ppptools@company.com |
CON_SMTP_PORT |
no | Port, default 587 |
587 or 465 |
CON_SMTP_SECURITY |
no | Encryption, default starttls |
starttls, tls or none |
CON_SMTP_USER |
usually | User name for signing in | ppptools@company.com |
CON_SMTP_PASSWORD |
usually | Password for signing in | — |
The server sends mail only once both required values are set.
Port and encryption go together:
- Port 587 →
CON_SMTP_SECURITY=starttls(default, right for most providers) - Port 465 →
CON_SMTP_SECURITY=tls noneonly for a mail server on your own network that cannot encrypt
Sender
Many providers only accept a sender that belongs to the signed-in account. When in doubt, set CON_SMTP_FROM to the same value as CON_SMTP_USER.
Example: Gmail
CON_SMTP_HOST=smtp.gmail.com
CON_SMTP_PORT=587
CON_SMTP_SECURITY=starttls
CON_SMTP_USER=your.address@gmail.com
CON_SMTP_PASSWORD=<app password>
CON_SMTP_FROM=your.address@gmail.com
Gmail does not accept your normal password here, only an app password: Google account → Security → 2-Step Verification (must be on) → App passwords. The app password has 16 letters; enter it without spaces.
Where the values go
With Portainer: open the stack → Editor → enter the values under Environment variables (or in advanced mode in stack.env) → Update the stack.
Portainer reads its own copy
Portainer uses its own stack.env. It does not read a .env file you put next to it on the share. New values take effect only after Update the stack.
With Docker Compose on the command line: write the values into the .env next to docker-compose.yml, then
docker compose up -d
The password belongs only in the server's environment, never in a Git repository.
Testing
In the browser: sign in as admin → Settings → Mail server. It shows the values the server picked up (the password only as "set" or "not set"). Enter an address → Send test mail. If it fails, the page shows the mail server's answer.
On the command line:
docker exec <app-container> content mail-test --to your.address@company.com
Common answers:
| Message | Cause |
|---|---|
SMTPAuthenticationError: 535 … |
Wrong user or password; with Gmail, the app password is missing |
TimeoutError / ConnectionRefusedError |
Wrong port, or the server may not connect outward |
SSLError: wrong version number |
Port and encryption do not match (587 needs starttls, 465 needs tls) |
SMTPSenderRefused |
The sender CON_SMTP_FROM does not belong to the signed-in account |
If the test mail does not arrive although the page says it was handed over, look in the spam folder.
Turning mails off
Each person decides which notices they get by mail: My account → Mail. There are three switches, all on to begin with:
| Switch | Who gets it | Where it shows without the mail |
|---|---|---|
| Decisions on what I submitted | whoever submitted something | Item manager → Mine |
| Submissions waiting for my decision | whoever may approve | Approvals |
| Warning before an idle draft goes to the trash | whoever created the draft, 14 days ahead | Item manager → Mine |
So turning a mail off only loses the nudge, never the news itself.
Without a switch, so always, come: the invitation, the password reset link and the test mail. They belong to the account itself.
When "waiting for my decision" is turned back on later, the next round mails whatever is still waiting then.
The admin sees under People who turned mails off (see Managing people). Nobody can change another person's switches.