There are four ways to send an email. They all go through the same delivery settings, use a template’s published version when they name one, and appear in Mail activity.

From a flow

Add the Send email block to a flow. It’s the usual way to send email from an app: trigger the flow from an event (a record created, a payment received), a schedule, a route or another flow. The block queues the message and continues straight away. Its output is { "queued": true, "job_id": "…" }. The message is sent in the background, so a slow provider never slows the flow or the request that started it. If the provider fails, the send is retried up to 3 times, waiting a few seconds longer each time. Each attempt is logged, and you can see the job under Activity → Jobs.

Example: a receipt when an order is paid

  1. Make a template order-confirmation that reads customer.first_name, order.number and order.items, and publish it.
  2. Make a flow, and an event subscription that runs it on orders.updated (or your own orders.paid event). The flow receives the event as input.event; a table’s events carry the record at input.event.payload.record.
  3. Add Get record (id customer) to load the customer by {{ input.event.payload.record.customer_id }}.
  4. Add Send email:
Because "{{ input.event.payload.record }}" is the whole setting, the order object is passed as an object, not as text. See passing values between blocks.

Send to many people

A list in To sends one message with everyone as a recipient, so they can see each other’s addresses. To send each person their own message, loop over them with the For each block and put Send email inside it. That’s also the only way to personalise each message.

Compose

Mail → Compose writes and sends one message. A scheduled message is rendered when you schedule it, so it goes out exactly as you saw it, even if the template changes in between. Cancel it from Mail activity before it’s sent.

From your server

Your server can send through the management API with a secret key. The key needs mail access: a key with no scopes, or one holding mail:write (see Keys and security).

The request

The response

Sent now:
Scheduled:
suppressed: true means delivery is paused: the message was recorded, not sent.

Errors

Sending over HTTP happens during the request and isn’t retried for you. For mail that must not be lost, send from a flow, which queues and retries, and call the flow from your server with pawabase.flows.run(...) (see Flows).

Send a test

POST /platform/v1/envs/{env}/mail/test sends a message immediately with the same fields as above, without attachments or scheduling. Its subject defaults to Pawabase test message. Studio’s test buttons use it.

Preview without sending

POST /platform/v1/envs/{env}/mail/render renders a subject, html and text with data, exactly as sending would, and returns them. Use it to show a preview in your own admin tools.

Sign-in emails

The sign-in system sends its emails itself: verification links and codes, sign-in links, password resets, invitations and security notices. They use the default sender and your brand, are queued and retried like flow mail, and appear in Activity with the source identity. Choose their wording in Email templates.

Choosing a sender

  • With no from_email, mail comes from the default sender set in Delivery.
  • Your provider must accept the address. Use addresses on a domain you’ve verified with it.
  • Use separate senders for different kinds of mail (orders@, support@, hello@) so people recognise them and replies go to the right place.

Usage and limits

Every delivery attempt counts towards your plan’s monthly emails, retries included, because your provider charges for each one. Suppressed messages count too. See Plans and limits.

Good practice

  • Send from flows for anything automatic: you get queuing, retries and a trace.
  • Use templates, not inline HTML, so wording changes don’t need a deploy.
  • Pass ids and look things up in the flow rather than sending huge data objects.
  • In development, pause delivery so tests never email real people.