Hoppa till innehållet

Apps

Nextcloud

Send the mail that Nextcloud writes, such as password resets, share notifications and welcome emails to new accounts, through Sendora’s SMTP.

Before you start

  • A Sendora account. A test server works from the moment the account exists. A live server sends once your account is approved. The account starts on Free, within the limits that Account › Usage in the dashboard shows.
  • Access to the DNS of the domain that Nextcloud’s mail comes from.
  • A Nextcloud administrator’s account with an email address under Personal settings › Profile & contact. Nextcloud sends its test email to that address.

Set up Nextcloud

  1. Add the domain that Nextcloud’s mail comes from under Domains, and add the two DNS records it shows, as Domains explains.
  2. Create a test server under Servers › New server, with Testserver ticked, and create a key on its API keys tab. The key starts with sk_test_. A test server takes mail as a live server does and delivers none of it.
  3. In Nextcloud, open Administration settings › Basic settings, and find Email server. Enter Sendora’s values:
FieldValue
Send modeSMTP
EncryptionSSL/TLS
Disable certificate verification (insecure)Off
From addressno-reply in Email, and your verified domain, such as example.se, in Domain
Server addresssmtp.sendora.se in Host, and 465 in Port
Authentication requiredOn
LoginThe server key
PasswordThe server key

Port 465 encrypts the connection from the first byte. Port 587 works too, with Encryption set to None / STARTTLS. Nextcloud then starts TLS only if the server offers it. Lines 277 to 279 of its mail code say so in 35.0.3. If someone between Nextcloud and Sendora removed that offer, Nextcloud would send the key unencrypted, so use 465 where you can. If Nextcloud runs on a host that blocks ports 465 and 587, such as a DigitalOcean Droplet, use port 2525 as you would 587.

  1. Click Save settings.
  2. Click Send test email. Nextcloud sends it to your own address, and shows Email sent successfully.
  3. Find the message on the server’s Messages tab under Servers.
  4. Once your account is approved, create a key on your live server’s API keys tab, such as the default server that signup made. Put it in Login and Password in place of the test key, and click Save settings.

Nextcloud in Docker

The nextcloud Docker image can take the same settings from the container’s environment. Set these variables, with the server key as both SMTP_NAME and SMTP_PASSWORD, and your verified domain in MAIL_DOMAIN:

SMTP_HOST=smtp.sendora.se
SMTP_SECURE=ssl
SMTP_PORT=465
SMTP_NAME=sk_test_…
SMTP_PASSWORD=sk_test_…
MAIL_FROM_ADDRESS=no-reply
MAIL_DOMAIN=example.se

Then recreate the container, such as with docker compose up -d. While the variables are set, their values win over the ones on Basic settings. For port 587 or 2525, set SMTP_SECURE=tls, which starts TLS as None / STARTTLS does.

If a message is refused

When Sendora refuses the test email, Nextcloud shows A problem occurred while sending the email. Nextcloud’s log, under Administration settings › Logging, holds Sendora’s reply for the test email and for the rest of Nextcloud’s mail. 535 5.7.8 means the key is wrong or revoked. 550 5.7.1 means the From domain is not verified, or that a live server’s account is not yet approved. 451 4.7.0 means that a limit is reached, such as Free’s daily limit. 550 5.1.1 means the recipient’s address is on the suppression list, for example after a hard bounce. SMTP replies lists every reply.

Test the setup

On the server’s API keys tab under Servers, Test the setup shows each valid key’s latest sign-in and accepted message over SMTP. It also shows the key’s latest refusals, each with what to do. After Nextcloud sends a message, click Check now.