Skip to content
Agentmart
Submit a tool

dilaya-mail

Use when a Dilaya app must send transactional email (receipts, notifications, confirmations).

Skill by hereya

IndexedMIT
Write a review

Chalk Labs

Need help deploying dilaya-mail?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hereya-dilaya-mail

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when a Dilaya app must send transactional email (receipts, notifications, confirmations).

Use cases: productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/dilaya-mail

What's inside

Skill name
dilaya-mail
Description
Use when a Dilaya app must send transactional email (receipts, notifications, confirmations).
License
MIT
Instructions
78 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

Tool names below are the Dilaya connector's tools; your client may show them with a prefix (e.g. `mcp__dilaya__query`).

# Transactional email (mail)

Send transactional email (receipts, notifications, magic links, confirmations) from an app via a dedicated per-app Postmark server. This is **separate** from `enable-auth` — mail is its own feature — though the two **share the app's sender domain** (`<app>-<orgslug>.<contentDomain>` — the same host as the app's vanity URL), auto-provisioned the first time either is enabled.

## Flow

`enable-mail` (once) → `send-mail` → `list-mail` (audit). Tear down with `disable-mail`.

## 1. Enable mail

```
enable-mail({ schema: "myapp" })
# → { from_email: "noreply@myapp-<orgslug>.<contentDomain>", mail_enabled: true }
```

Provisions a dedicated per-app Postmark server and verifies the sender domain (find-or-create — reuses the domain `enable-auth` already created, or creates it). Idempotent. **The sender domain can take ~1 min to verify the first time** — the very first send in that window may be delayed; retry if it errors. You do NOT need `enable-auth` or a frontend to use mail.

## 2. Send

```
send-mail({ schema: "myapp", to: "marie@example.com", subject: "Your receipt", html: "<h1>Merci!</h1>", text: "Merci!" })
# → { message_id: "..." }
```

- `to`, `subject`, and **at least one of** `html` / `text` are required (else `INVALID_BODY`).
- The `From` is fixed to the app's provisioned `noreply@…` sender — you cannot override it.
- Transactional (outbound) stream only — no bulk/broadcast. Requires `enable-mail` first (else `MAIL_NOT_ENABLED`).
- `RECIPIENT_REJECTED`: Postmark refuses that address (invalid, or inactive after a hard bounce / spam complaint). Fix the address; retrying will not help.

**Attachments** — reference files already in the org's storage (upload with `get-upload-url` first if needed):

```
send-mail({ schema: "myapp", to: "marie@example.com", subject: "Facture", html: "<p>Ci-joint.</p>",
            attachments: [{ path: "myapp/invoices/2026-07.pdf" }] })
```

- Each attachment: `{ path, name?, content_type?, content_id? }` — `path` is the org-storage path (same as the file tools / `list-files`); `name` defaults to the basename, `content_type` is inferred from the extension.
- Max **10 files, 7 MB total** per message (`ATTACHMENT_TOO_LARGE` / `TOO_MANY_ATTACHMENTS`); Postmark caps the whole message at 10 MB encoded.
- Inline images: set `content_id: "logo"` and reference it in the html as `<img src="cid:logo">`.

## 3. Audit

```
list-mail({ schema: "myapp", limit: 50 })   # recent sends, newest first (default 50)
```

Every send is logged to `_mail_log` (`to_email, subject, message_id, status, error, created_at`) — `status` is `sent` or `error`. Query it with `query`, or build a cowork dashboard on it.

## Send from a frontend handler (runtime helper)

A deployed **frontend handler** can send mail itself — no agent in the loop — via the runtime layer's `mail` helper (same fixed sender, same `enable-mail` requirement). It pairs with the `frontend` topic:

```js
const { mail, parseRequest } = require("hereya");

exports.handler = async (event) => {
  const req = parseRequest(event);
  const { message_id } = await mail.send({
    to: "marie@example.com",
    subject: "Your receipt",
    html: "<h1>Merci!</h1>",
    text: "Merci!",
  });
  return { statusCode: 200, headers: { "content-type": "text/html" }, body: "sent " + message_id };
};
```

`mail.send({ to, subject, html?, text?, attachments? })` → `{ message_id }`. It **throws** if mail was never enabled (`mail is not enabled for app '<app>'. Ask the app's agent to run enable-mail first.`) — run `enable-mail` once first. The From is the same fixed `noreply@…` sender and cannot be overridden. This lean handler path does **not** write to `_mail_log` (only the MCP `send-mail` tool logs).

Handler attachments take `{ path }` (a file in THIS app's storage, app-relative — e.g. `"reports/q4.pdf"`) **or** `{ content, name }` (base64, for files generated in the handler), plus optional `content_type` / `content_id`. Same limits: 10 files, 7 MB total.

## Teardown

`disable-mail({ schema: "myapp", confirm: true })` deletes the per-app Postmark mail server + SSM token and clears the config (the `_mail_log` history is kept). The shared sender domain is left in place (per-app auth may still use it).

From hereya/dilaya-plugin, MIT.

More from hereya/dilaya-plugin

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 5, 2026 (25 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hereya

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get dilaya-mail running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying dilaya-mail?

CallGet help
Cite this page

dilaya-mail skill. Agent Mart. https://agentmart.dev/skills/hereya-dilaya-mail (last updated 2026-10-24)