Transactional email API and SMTP on DASTER

Send sign-up, receipt and reset emails from your app with DASTER App email, over the HTTP API, the SDK or SMTP, with delivery logs and webhooks.

Last updated

DASTER App email sends your app's transactional email, such as sign-up, receipt and password reset messages, from a sender domain you verify. Your server sends with the HTTP API, the SDK or SMTP at smtp.daster.io, and every message shows in Delivery logs. App email can also receive mail at inbound.<your domain>.

What do you get?

  • An HTTP API and SMTP that share one queue: the same limits, suppressions, sender domain checks and delivery logs.
  • Sender domains with the DKIM, SPF and DMARC records to add at your DNS provider, and Check records.
  • Templates with {{variables}}; HTML variable values are escaped.
  • Scheduled sends that can be cancelled, cc, bcc, replyTo, tags, and up to 10 attachments through the HTTP API.
  • Delivery logs with a timeline per message, Suppressions, and Webhooks that send signed delivery events and can replay them.
  • Receiving at inbound.<your domain>, routed to a webhook or stored for 30 days.

What are the limits today?

LimitValue
Per project environment200 emails a UTC day, 5,000 a UTC month
Per organization, across all projects200 a day, 5,000 a month
SMTP1 recipient per message, 256 KiB, 60 messages a minute
Attachments (HTTP API)10 files, 5 MiB each, 10 MiB in all
  • The From address must be on a verified sender domain of the project.
  • Browser keys (daster_pk_…) cannot send email. Send from your server.
  • SMTP takes no attachments, Cc or Bcc. Port 25 is not offered.
  1. Turn on App email

    Open App email in your project and choose Turn on App email.

  2. Verify your sender domain

    Add an email domain and open its page. Add the DKIM, SPF and DMARC records it shows at your DNS provider, then choose Check records. Once the records are verified, the domain can be used as a sender. Send test email sends you a first message.

  3. Get a key

    The project's server key can send and read email. For a narrower key, open App email › Settings and create one with Sending access and, if you like, the one domain it may send from. The key (daster_sk_dev_…) is shown once. Keep it on your server.

  4. Send with the HTTP API

    HTTP
    POST https://app.daster.io/communications/v1/projects/{projectId}/email/send
    Authorization: Bearer daster_sk_dev_…
    Idempotency-Key: welcome-user-42
    Content-Type: application/json
    
    {
      "from": "hello@example.com",
      "to": "user@example.com",
      "subject": "Welcome",
      "text": "Thanks for signing up."
    }

    Send html, or a templateId with variables, instead of or beside text. The Idempotency-Key makes a retry return the first message instead of sending twice. The SDK's sendMessage wraps this call.

  5. Or send over SMTP

    SettingValue
    Hostsmtp.daster.io
    Port465 with TLS from the start, or 587 with STARTTLS
    UsernameYour project ID
    PasswordA project key that can send email (daster_sk_…)
    AuthPLAIN or LOGIN

    With Nodemailer:

    JavaScript
    import nodemailer from 'nodemailer';
    
    const transport = nodemailer.createTransport({
      host: 'smtp.daster.io',
      port: 587,
      secure: false,
      requireTLS: true,
      auth: {
        user: process.env.DASTER_PROJECT_ID,
        pass: process.env.DASTER_EMAIL_KEY,
      },
    });
    
    await transport.sendMail({
      from: 'Northwind <hello@example.com>',
      to: 'user@example.com',
      subject: 'Welcome',
      text: 'Thanks for signing up.',
    });

    DASTER uses the message's Message-ID as its retry key, so a message your library sends again after a dropped connection goes out once.

  6. Follow delivery

    Open Delivery logs to see each message and its timeline. To get delivery events in your app, add an endpoint under Webhooks; its signing secret is shown once.

Questions about App email

Do I need an account with an email provider?

No. App email sends from DASTER, from a sender domain you verify in your project.

Can I send email from browser code?

No. Browser keys (daster_pk_…) cannot send. Send from your server with the server key or an App email key, and never put either key in browser code.

What happens when I reach the daily limit?

The send is refused with 429 email_quota_exceeded. Its details say which limit was reached, how many were used and when it resets. Metrics shows today and this month for the project and the organization.

Can I send attachments or several recipients over SMTP?

No. SMTP takes one recipient per message and no attachments. Send one message per recipient, or use the HTTP API, which takes cc, bcc and up to 10 attachments.

Can my app receive email too?

Yes. Add an MX record for inbound.<your domain>, turn on Receiving for the domain, and add a route that sends mail to a webhook or stores it. Received email is kept for 30 days.

Is App email for newsletters?

No. App email is for messages your app sends to one person at a time. Campaigns to contacts who agreed to receive them go through Marketing email, a separate service.

In the docs

  • App email: sender domains, templates, keys, the API and limits.
  • Send over SMTP: settings, what a message may contain, retries and examples.
  • Receive email: the MX record, routes and the received-email event.
  • Use the SDK: sendMessage from JavaScript or TypeScript.
  • Email header analyzer: a free tool that shows whether a delivered message passed SPF, DKIM and DMARC.

Next steps