# sanmailer

> Nodemailer and email adapter

Latest version **2.1.0** (published 2016-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install sanmailer
pnpm add sanmailer
yarn add sanmailer
bun add sanmailer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2016-06-16 |
| First published | 2016-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | SanJorgeK |
| Maintainers | sanjorgek |
| Keywords | mail, node, local, email |

## Links

- npm: https://www.npmjs.com/package/sanmailer
- Repository: https://github.com/sanjorgek/sanmailer
- Homepage: https://github.com/sanjorgek/sanmailer#readme
- Issues: https://github.com/sanjorgek/sanmailer/issues
- npm.io page: https://npm.io/package/sanmailer

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [email](https://npm.io/package/email.md) ^0.2.6
- [nodemailer](https://npm.io/package/nodemailer.md) ^2.4.1

## 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

- 2.1.0 (latest) — 2016-06-16
- 2.0.2 — 2016-06-15
- 2.0.1 — 2016-06-15
- 2.0.0 — 2016-06-09
- 1.1.0 — 2016-06-09
- 1.0.0 — 2016-06-09

## README

# sanmailer
[nodemailer](https://www.npmjs.com/package/nodemailer) and [email](https://www.npmjs.com/package/email) simple adapter

  [![NPM Version][npm-image]][npm-url]
  [![NPM Downloads][downloads-image]][downloads-url]

## Settings
~~~bash
$ npm install sanmailer 
~~~
If you have [Sendmail](http://www.sendmail.com/sm/open_source/) installed you don't need settings
~~~js
var mailer = require('sanmailer').local();
~~~

With host settings:
~~~js
var mailerConf = {
  host: 'some.valid.host.com',
  port: 587,
  debug: false,
  auth: {
    user: 'username',
    pass: 'password'
  }  
};
...
var mailer = require('sanmailer').host(mailerConf);
~~~

## Use
You have two methods

### sendMail
~~~js
mailer.sendMail(
  '<from@mail.com>',
  'to@mail.com',
  'Subject',
  'body',
  {
    //optative fields
    replyTo: ['mail1@mail.com', 'mail2@mail.com'],
    cc: []
  },
  function(error, info){
    //handle
  }
);
~~~

### checkMail
~~~js
if(mailer.checkEmail(req.body.sEmail)){
  //do stuf  
}
~~~

[npm-image]: https://img.shields.io/npm/v/sanmailer.svg
[npm-url]: https://npmjs.org/package/sanmailer
[downloads-image]: https://img.shields.io/npm/dm/sanmailer.svg
[downloads-url]: https://npmjs.org/package/sanmailer

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