Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bobthered/nodemailer
Nodemailer wrapper helper.
https://github.com/bobthered/nodemailer
Last synced: 9 days ago
JSON representation
Nodemailer wrapper helper.
- Host: GitHub
- URL: https://github.com/bobthered/nodemailer
- Owner: bobthered
- Created: 2021-12-07T12:12:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-07T14:57:19.000Z (about 3 years ago)
- Last Synced: 2024-11-09T14:22:19.562Z (2 months ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @bobthered/nodemailer
## Description
Nodemailer wrapper helper.## Installation
```
npm i @bobthered/nodemailer
```## Basic Usage
```js
// import sendMail from repo
import { sendMail } from '@bobthered/nodemailer'// initiate mail transport
const transport = {
service: 'gmail',
auth: {
pass: 'gmail_password',
user: 'gmail_username_with_email'
}
}// initiate mail options
const options = {
transport,
from: 'John Doe ',
to: '[email protected]',
subject: 'Email Subject',
text: 'Body of the email goes here',
html: 'Body> of the email goes here',
}try {
await sendMail(options);
} catch (error) {
console.error(error)
}
```