Skip to content

SMTP

Damvia sends plain-text emails through Nodemailer over SMTP. There is no HTTP mail API integration and no HTML. Every message is sent by a worker job, so a working SMTP setup also needs a process with ENABLE_WORKER=true.

VariableDefaultNotes
SMTP_HOSTlocalhost
SMTP_PORT1025Nodemailer picks TLS mode from the port: 465 is implicit TLS, 587 and 25 start plain and upgrade with STARTTLS when the server offers it.
SMTP_USERunsetAuthentication is only configured when both user and password are set.
SMTP_PASSunset

The defaults match MailHog from server/docker-compose.yml, which accepts anything on port 1025 and shows it at http://localhost:8025.

Sender addresses and subjects are not variables; they are in the mail templates. See Email templates.

The transport adds the header X-PM-Message-Stream: outbound to every message. On Postmark this selects the default transactional stream; other providers ignore the header. A Postmark setup:

Terminal window
SMTP_HOST=smtp.postmarkapp.com
SMTP_PORT=587
SMTP_USER=<server API token>
SMTP_PASS=<server API token>

Postmark uses the same server token as both user and password. The from addresses in the templates must belong to a verified sender signature or domain.

Any SMTP relay works, for example Amazon SES (email-smtp.<region>.amazonaws.com:587 with SMTP credentials), Mailgun, Brevo, or a company mail server. The requirements are the same: the relay must accept the from addresses in the templates, and it should sign with SPF and DKIM so verification links are not filtered.

EventTemplate
Sign-up, resend verificationemail-verification
Login without passwordlogin
Password reset requestreset-password
Unapproved user verified their emailrequest-approval, to the admins and managers of the user’s region
User approveduser-approved
Email-type download readydownload-ready
Guest invited to a collectioninvitation

There is no digest, newsletter or notification email beyond these seven, and no email is sent to admins on sync errors; use the server logs for that.

  1. With the worker running, request a password reset from the login page for an existing account.
  2. Watch the server log for a job line with status: failed and queue mailer/password-reset if delivery fails; Nodemailer’s error message (authentication, connection, sender rejected) is included.
  3. On success nothing is logged; check the inbox or the provider’s activity log.

A failed mail job is retried with backoff by pg-boss, so fixing the SMTP settings and restarting the worker delivers the pending messages.