# @types/mailgen

> TypeScript definitions for mailgen

Latest version **2.0.7** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/mailgen
pnpm add @types/mailgen
yarn add @types/mailgen
bun add @types/mailgen
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2023-11-07 |
| First published | 2016-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/mailgen
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mailgen
- npm.io page: https://npm.io/package/@types/mailgen

## Recent versions

- 2.0.7 (latest) — 2023-11-07
- 2.0.5 (ts3.6) — 2021-07-08
- 2.0.4 (ts3.5) — 2021-05-26
- 2.0.3 (ts2.8) — 2020-02-04
- 2.0.2 (ts2.0) — 2018-09-24
- 2.0.6 — 2023-10-18
- 2.0.1 — 2017-04-26
- 2.0.0 — 2016-12-23

## README

# Installation
> `npm install --save @types/mailgen`

# Summary
This package contains type definitions for mailgen (https://github.com/eladnava/mailgen#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mailgen.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mailgen/index.d.ts)
````ts
import Option = Mailgen.Option;
import Content = Mailgen.Content;
/**
 * Created by kiettv on 7/24/16.
 */
declare class Mailgen {
    constructor(opts: Option);

    cacheThemes(): void;

    generate(params: Content): any;

    generatePlaintext(params: Content): any;

    parseParams(params: any): any;
}

declare namespace Mailgen {
    interface Option {
        theme: string | CustomTheme;
        product: Product;
    }

    interface CustomTheme {
        path: string;
        plaintextPath?: string | undefined;
    }

    interface Product {
        name: string;
        link: string;
        logo?: string | undefined;
        logoHeight?: string | undefined;
        copyright?: string | undefined;
    }

    interface Content {
        body: ContentBody;
    }

    interface ContentBody {
        name?: string | undefined;
        greeting?: string | undefined;
        signature?: string | undefined;
        title?: string | undefined;
        intro?: string | string[] | undefined;
        action?: Action | Action[] | undefined;
        table?: Table | Table[] | undefined;
        dictionary?: any;
        goToAction?: GoToAction | undefined;
        outro?: string | string[] | undefined;
    }

    interface Table {
        data: any[];
        columns?: ColumnOptions[] | undefined;
    }

    interface ColumnOptions {
        customWidth: any;
        customAlignment: any;
    }

    interface GoToAction {
        text: string;
        link: string;
        description: string;
    }

    interface Action {
        instructions: string;
        button: Button;
    }

    interface Button {
        color: string;
        text: string;
        link: string;
    }
}

export = Mailgen;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Kiet Thanh Vo](https://github.com/vothanhkiet), [Jordan Farrer](https://github.com/jordanfarrer), and [Grzegorz Kawka-Osik](https://github.com/grzegorzkawkaosik).

---
_Source: https://npm.io/package/@types/mailgen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
