# Send transactional email from your app without touching DNS

> Send transactional email from your app instantly using a verified project address, with DKIM, SPF, and DMARC aligned and zero DNS setup required.

**You can send transactional email from your app immediately by using your project's built-in mail domain, which comes with DKIM, SPF, and DMARC already aligned.** Every project on thelastapi gets a mail address at `<slug>.vibiz.app` that requires no manual DNS record editing. You add the email resource, wait a few minutes for verification, and send receipts, alerts, or welcome notes straight from your backend code or terminal.

This guide walks through how transactional sending works without touching DNS, the exact code required in TypeScript, curl, and the CLI, and what rules apply.

## How sending works without manual DNS

Typically, sending transactional email requires choosing a provider, navigating to your DNS registrar, and manually pasting three or four `CNAME`, `MX`, and `TXT` records. If you make a typo in an SPF string or neglect a DKIM record, messages end up in spam or fail outright.

With thelastapi, you skip that configuration step entirely for transactional mail. When you attach the `email` resource to a project, the system assigns the project a dedicated mail domain at `<slug>.vibiz.app`. 

Because thelastapi manages the parent domain, DKIM, SPF, and DMARC are aligned automatically. The domain verifies within minutes of creation (`status: pending → verified`). Your application then sends mail from `<mailbox>@<slug>.vibiz.app` (such as `info@acme-bakery.vibiz.app` or `orders@acme-bakery.vibiz.app`).

You do not need to host your application with thelastapi to use this. A script, a mobile backend, or a server hosted elsewhere can send through the API using the project's app key.

## Adding the email resource

To get started, create a project or add email to an existing one using the CLI:

```bash
# Add email to an existing project
vibiz add email

# Or initialize a mailer-only project for an external app
vibiz init mailer --resources email
```

When the resource is added, the domain begins verification. If your application attempts to send before the records align, the API responds with `409 dependency_not_ready`. Once verified, sending is active.

You can test sending immediately from your terminal:

```bash
vibiz send --to ana@example.com --subject "Your order is ready" --text "Pick it up any time today." --from orders
```

## Sending from your application

Your backend sends transactional email using the `@vibiz/app` package or raw HTTP requests. 

### In Node.js or Next.js

Install the client package and run the send call server-side. The call authenticates using `VIBIZ_APP_KEY`:

```ts
import { vibiz } from '@vibiz/app';

await vibiz.email.send({
  to: 'ana@example.com',
  subject: 'Your order is ready',
  text: 'Pick it up any time today.',
  from: 'orders', // sends as orders@<slug>.vibiz.app
  reply_to: 'owner@example.com',
});
```

Because the generated mail domain does not receive incoming mail yet, always pass `reply_to` pointing to an active mailbox if you expect recipients to write back. If you are building an onboarding flow, see our guide on how to [send a welcome email from a Next.js app](https://thelastapi.dev/blog/welcome-email-nextjs).

### Using curl over HTTP

From any language or HTTP client, send a `POST` request to the project actions route. You can authenticate using an account API key (`VIBIZ_API_KEY`) or send to `POST /v1/app/actions/email.send` using your app key.

```bash
curl https://thelastapi.dev/v1/projects/prj_123/actions/email.send \
  -H "Authorization: Bearer $VIBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-ready-1092" \
  -d '{
    "input": {
      "to": "ana@example.com",
      "subject": "Your order is ready",
      "text": "Pick it up any time today.",
      "from": "orders",
      "reply_to": "owner@example.com"
    }
  }'
```

The response includes the message id, delivery status, and daily usage:

```json
{
  "output": {
    "id": "msg_abc123",
    "from": "orders@acme-bakery.vibiz.app",
    "to": "ana@example.com",
    "status": "sent"
  },
  "usage": {
    "used": 1,
    "limit": 50,
    "resets_at": "2026-03-31T00:00:00Z"
  }
}
```

Always include an `Idempotency-Key` header on transactional events like order confirmations or password resets so retried requests never double-send. AI agents interacting with your backend can call the same tool via `vibiz_send_email`.

## Request fields and options

The payload accepts the following parameters:

| Field | Required | Notes |
| --- | --- | --- |
| `to` | Yes | A single destination email address. |
| `subject` | Yes | The subject line string. |
| `text` / `html` | One of them | Plain text body or HTML formatted body. |
| `from` | No | Mailbox prefix before the `@`. Defaults to `info`. |
| `from_name` | No | The display name shown in email clients. |
| `reply_to` | No | Target address where recipient replies are directed. |

## Pricing and operational limits

Transactional sending on the project address is designed for operational notifications, account alerts, and system triggers:

- **Volume Limit:** 50 emails per project per UTC day across all mailboxes. When you hit the limit, requests return `429 rate_limited` with details on when the counter resets (`resets_at`).
- **Recipients:** Exactly one recipient per send call.
- **Cost:** Each sent email costs a fraction of a cent from your account credits (about $0.00013, calculated as $0.0001 plus 30%). A failed send records nothing. The `vibiz_usage` view tracks total billed amounts.
- **Reputation Safety:** High bounce rates or recipient spam complaints will pause your project's sending capability (`403 sending_paused`). Email does not have a separate development sandbox; test calls send real messages to destination addresses.

## When you need your own custom domain

The `<slug>.vibiz.app` address lets you ship without touching DNS records, but eventually you may want to receive replies or send from `hello@yourcompany.com`. 

When you decide to transition:

1. **Purchasing via thelastapi:** If you purchase a domain directly using `vibiz domains buy <domain>`, all DNS records (including `MX`, `CNAME` for DKIM, and SPF `TXT`) are configured automatically without manual pasting.
2. **Bringing an external domain:** If you own an external domain, you can configure an inbox or mail forwarding by adding the MX and DKIM records provided by `vibiz email dns <domain> --check`. Learn more about configuring shared inboxes in [a business inbox at your own domain](https://thelastapi.dev/blog/business-inbox-own-domain).
3. **Marketing vs. Transactional:** If you plan to send bulk updates, keep marketing separate from system alerts so delivery issues never block password resets. You can review how to [import a newsletter list from CSV, safely](https://thelastapi.dev/blog/import-newsletter-list-csv) to see how audience imports and unsubscribes are managed. If your application also requires SMS transactional alerts, read about how to [send SMS from your app: carrier approval explained](https://thelastapi.dev/blog/send-sms-from-app-carrier-approval).

## Handling errors

When sending from your app, check for the following error states:

| Code | HTTP Status | Cause | Resolution |
| --- | --- | --- | --- |
| `rate_limited` | 429 | Exceeded 50 emails for the current UTC day. | Inspect `details.resets_at` and retry after that timestamp. |
| `dependency_not_ready` | 409 | The `email` resource is missing or still verifying. | Add the resource via `vibiz add email` or wait a few minutes for verification. |
| `forbidden` (`sending_paused`) | 403 | Elevated bounce or spam complaint rates paused sending. | Clean recipient inputs and email support to restore sending. |
| `invalid_request` | 400 | Malformed payload or an unroutable recipient. | Check `details` for invalid fields or malformed emails. |

To inspect full endpoint options and SDK signatures, see the official [Email documentation](https://thelastapi.dev/docs/email). Create your account at [thelastapi.dev/start](https://thelastapi.dev/start) to start sending transactional messages from your app in minutes.

## Frequently asked questions

### Can I send to multiple recipients in a single API call?

No, transactional sends on the project address accept exactly one recipient per send call. If you need to message multiple recipients, loop through them and send distinct requests with unique idempotency keys.

### Can the default project mail domain receive incoming replies?

No, the `<slug>.vibiz.app` domain is send-only. You must specify the `reply_to` parameter in your request to route replies to an inbox you actively monitor.

### How long does it take for a new project address to verify?

The `<slug>.vibiz.app` domain verifies automatically within a few minutes after running `vibiz add email`. Sends attempted during the verification window return a `409 dependency_not_ready` error.

### What happens if an email fails to deliver or bounces?

A failed send does not count toward your daily 50-email limit and records no cost against your balance. However, high bounce rates will pause the project's sending permission.

---

Published 2026-11-15 · https://thelastapi.dev/blog/send-transactional-email-no-dns
