Contents

Email

The site sends email for two things: form notifications (set up per form under Forms → Forms → Emails) and password resets. It sends through any SMTP server, configured in the environment:

Variable
SMTP_HOSTThe server. Without it nothing is sent: Payload writes each email to the server's console instead.
SMTP_PORT587 (STARTTLS) by default; 465 uses TLS throughout.
SMTP_USER, SMTP_PASSThe login, if the server needs one.
SMTP_FROMThe sender address. Required when SMTP_HOST is set: the server refuses to start without it, rather than lose every message.
SMTP_FROM_NAMEThe sender's name. Defaults to "Website".

Nothing here is specific to one provider. A transactional email service (one that gives you SMTP credentials) works, and so does your own mail server.

A public demo (DEMO_MODE) sends no email at all, whatever these say: see Live demo.

Form notifications #

Editors set up who gets an email for each form. Some details worth knowing:

  • An email with no Email To goes to the SMTP_FROM address.
  • {{name}} in a subject or message is replaced by the answer to the field called name; {{*:table}} lists every answer.
  • Submissions are stored whether or not the email is sent, so a notification that does not arrive loses nothing.

In development #

Leave SMTP_HOST empty. Emails, password resets included, are printed in the terminal that runs pnpm dev.

These guides ship with Tolk Starter 0.6.0: buyers get the same pages in their repository, next to the code they describe.