# @transomjs/transom-smtp

> Add SMTP functions and email templating to server-side Transom code

Latest version **5.0.0** (published 2024-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @transomjs/transom-smtp
pnpm add @transomjs/transom-smtp
yarn add @transomjs/transom-smtp
bun add @transomjs/transom-smtp
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2024-11-29 |
| First published | 2017-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark Voorberg |
| Maintainers | binaryops.mark, binaryops.wiebo |
| Keywords | smtp, email |

## Links

- npm: https://www.npmjs.com/package/@transomjs/transom-smtp
- Repository: https://github.com/transomjs/transom-smtp
- Homepage: https://github.com/transomjs/transom-smtp#readme
- Issues: https://github.com/transomjs/transom-smtp/issues
- npm.io page: https://npm.io/package/@transomjs/transom-smtp

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 5.0.0 (latest) — 2024-11-29
- 3.0.0 — 2024-01-27
- 2.0.1 — 2019-11-27
- 2.0.0 — 2019-06-10
- 1.0.6 — 2019-03-29
- 1.0.5 — 2018-06-29
- 1.0.4 — 2017-11-28
- 1.0.3 — 2017-11-14
- 1.0.2 — 2017-11-14
- 1.0.1 — 2017-11-05

## README

# transom-smtp
Add simple to use SMTP messaging functions to your server-side Transomjs code.

[![Build Status](https://travis-ci.org/transomjs/transom-smtp.svg?branch=master)](https://travis-ci.org/transomjs/transom-smtp)
[![Coverage Status](https://coveralls.io/repos/github/transomjs/transom-smtp/badge.svg?branch=master)](https://coveralls.io/github/transomjs/transom-smtp?branch=master)

## Installation

```bash
$ npm install --save @transomjs/transom-smtp
```

## Usage

#### options.smtp
options.smtp is passed in directly to nodemailer.createTransport() and follows the nodemailer configuration.

#### options.helpers
options.helpers adds methods to send email from specific addresses.
The following example puts "sendFromNoreply()" and "sendFromAdmin()" methods on the transomSmtp Object.

NOTE: a sendFromNoreply() method is required when using transomSmtp with the transom-mongoose-localuser.

```
    const Transom = require('@transomjs/transom-core');
    const transomSmtp = require('@transomjs/transom-smtp');

    const transom = new Transom();

    const options = {
        smtp: {
            host: 'smtp.example.com',
            port: 587,
            secure: false,
            auth: {
                user: 'username',
                pass: 'password'
            }
        },
        helpers: {
            noreply: '"No Replies" donotreply@hello.com',
            admin: 'administrator@hello.com'
		}
    };
    transom.configure(transomSmtp, options);

    transom.initialize(server, myApi).then(function(server){
    	...
    });

```

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