> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ooneex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# mailer:create

> Generate a new mailer class.

Scaffolds a mailer class, its JSX template, and their test files into the target module. It writes `modules/<module>/src/mailers/<Name>Mailer.ts`, `modules/<module>/src/mailers/<Name>MailerTemplate.tsx`, `modules/<module>/tests/mailers/<Name>Mailer.spec.ts`, and `modules/<module>/tests/mailers/<Name>MailerTemplate.spec.ts`, and installs the `@ooneex/mailer` dependency if it is missing.

## Usage

```bash theme={null}
ooneex mailer:create [options]
```

## Examples

```bash theme={null}
ooneex mailer:create
```

```bash theme={null}
ooneex mailer:create --name=Welcome
```

```bash theme={null}
ooneex mailer:create --name=PasswordReset --module=auth --override
```

## Options

| Option       | Description                                                    | Default             |
| ------------ | -------------------------------------------------------------- | ------------------- |
| `--name`     | Resource name (the `Mailer` suffix is appended automatically). | Prompted if omitted |
| `--module`   | Target module.                                                 | `shared`            |
| `--override` | Overwrite an existing file without confirmation.               | `false`             |

## AI Skill

This command ships a matching `mailer:create` skill. Your AI agent uses it to generate a new email sender class with its JSX template and test files, then complete the `send` method and template props using `@ooneex/mailer`.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    ooneex claude:init
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    ooneex codex:init
    ```
  </Tab>
</Tabs>
