# @types/smtpapi

> TypeScript definitions for smtpapi

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

## Install

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

## 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 | 1.2.33 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.2.33 (latest) — 2023-11-07
- 1.2.30 (ts2.0) — 2016-09-19
- 1.2.32 — 2023-10-18
- 1.2.31 — 2023-09-25
- 1.2.29 — 2016-08-25
- 1.2.28 — 2016-08-19
- 1.2.27 — 2016-08-02
- 1.2.26 — 2016-07-14
- 1.2.25-alpha — 2016-07-08
- 1.2.24-alpha — 2016-07-04
- 1.2.23-alpha — 2016-07-02
- 1.2.22-alpha — 2016-07-01
- 1.2.21-alpha — 2016-07-01
- 1.2.20-alpha — 2016-05-25
- 1.2.19-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/smtpapi/versions

## README

# Installation
> `npm install --save @types/smtpapi`

# Summary
This package contains type definitions for smtpapi (https://github.com/sendgrid/smtpapi-nodejs).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smtpapi.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smtpapi/index.d.ts)
````ts
declare var SmtpApi: SmtpApi.Constructor;
export = SmtpApi;

declare namespace SmtpApi {
    interface Header {
        to: string[];
        sub: Object;
        unique_args: Object;
        category: string[];
        section: Object;
        filters: Object;
        send_at: "" | number;
        send_each_at: number[];
        asm_group_id: number;
        ip_pool: string;
    }

    interface Constructor {
        new(): Instance;
        new(header: Header): Instance;
    }

    interface Instance {
        header: Header;
        version: string;

        jsonObject(): Header;
        jsonString(): string;

        addTo(to: string): void;
        addTo(tos: string[]): void;
        addSubstitution(key: string, val: string): void;
        addSubstitution(key: string, val: string[]): void;
        addUniqueArg(key: string, val: string): void;
        addCategory(cat: string): void;
        addCategory(cat: string[]): void;
        addSection(sec: string, val: string): void;
        addFilter(filter: string, setting: string, val: number): void;
        addFilter(filter: string, setting: string, val: string): void;
        addSendEachAt(send_each_at: number): void;
        addSendEachAt(send_each_at: number[]): void;

        setTos(email: string): void;
        setTos(emails: string[]): void;
        setSubstitutions(subs: Object): void;
        setUniqueArgs(val: Object): void;
        setCategories(cats: string): void;
        setCategories(cats: string[]): void;
        setSections(sec: Object): void;
        setFilters(filters: Object): void;
        setSendAt(send_at: number): void;
        setSendEachAt(send_each_at: number[]): void;
        setASMGroupID(asm_group_id: number): void;
        setIpPool(ip_pool: string): void;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Antonio Morales](https://github.com/a-morales).

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