Socket
Socket
Sign inDemoInstall

paubox-node

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

0

.eslintrc.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@

2

lib/data/message.js

@@ -19,2 +19,4 @@ "use strict";

this.attachments = options.attachments;
this.listUnsubscribe = options.list_unsubscribe;
this.listUnsubscribePost = options.list_unsubscribe_post;
};

@@ -21,0 +23,0 @@

@@ -0,0 +0,0 @@ "use strict";

@@ -83,2 +83,4 @@ "use strict";

headers["reply-to"] = msg.replyTo;
headers["List-Unsubscribe"] = msg.listUnsubscribe;
headers["List-Unsubscribe-Post"] = msg.listUnsubscribePost;
content["text/plain"] = msg.plaintext; //base 64 encoding html text

@@ -85,0 +87,0 @@

2

package.json
{
"name": "paubox-node",
"version": "1.2.3",
"version": "1.2.4",
"description": "A Node.js module for the Paubox Transactional Email API.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,6 +1,9 @@

<img src="https://github.com/Paubox/paubox-csharp/raw/master/paubox_logo.png" alt="Paubox" width="150px">
# Paubox NodeJS
This is the official NodeJS wrapper for the [Paubox Transactional Email API](https://www.paubox.com/solutions/email-api). It is currently in alpha development.
This is the official NodeJS wrapper for the [Paubox Email API](https://www.paubox.com/solutions/email-api).
The Paubox Transactional Email API allows your application to send secure, HIPAA-compliant email via Paubox and track deliveries and opens.
The Paubox Email API allows your application to send secure,
compliant email via Paubox and track deliveries and opens.
The API wrapper allows you to construct and send messages.

@@ -14,2 +17,4 @@

Further documentation can be found at [docs.paubox.com](https://docs.paubox.com/docs/paubox_email_api/introduction/).
<a name="#installation"></a>

@@ -25,3 +30,3 @@ ## Installation

### Getting Paubox API Credentials
You will need to have a Paubox account. You can [sign up here](https://www.paubox.com/join/see-pricing?unit=messages).
You will need to have a Paubox account. You can [sign up here](https://www.paubox.com/join/see-pricing?unit=messages#paubox-email-api).

@@ -34,2 +39,7 @@ Once you have an account, follow the instructions on the Rest API dashboard to verify domain ownership and generate API credentials.

Your "API Username" comes from your unique API endpoint.
**Base URL:** ```https://api.paubox.net/v1/<USERNAME>```
```bash

@@ -86,3 +96,3 @@ $ echo "API_KEY='YOUR_API_KEY'" > .env

If you want to send non-PHI mail that does not need to be HIPAA-compliant, you can allow the message delivery to take place even if a TLS connection is unavailable.
If you want to send non-PHI mail that does not need to be HIPAA compliant, you can allow the message delivery to take place even if a TLS connection is unavailable.

@@ -132,2 +142,26 @@ This means the message will not be converted into a secure portal message when a nonTLS connection is encountered. To do this, include `allowNonTLS: true` in the options, as shown below:

### Adding the List-Unsubscribe Header
The List-Unsubscribe header provides the recipient with the option to easily opt-out of receiving any future communications. A more detailed explaination and usage guide for this header can be found at our [docs here.](https://docs.paubox.com/docs/paubox_email_api/messages/#list-unsubscribe)
This header can be used by adding the `list_unsubscribe: '<Email Unsubscribe Address>, <Web Unsubscribe URL'` and `list_unsubscribe_post: 'List-Unsubscribe=One-Click'` key-value pairs to the options object as follows:
```javascript
"use strict";
require('dotenv').config();
const pbMail = require('paubox-node');
const service = pbMail.emailService();
var options = {
from: 'sender@domain.com',
to: ['recipient@example.com'],
subject: 'Testing!',
text_content: 'Hello World!',
html_content: '<html><head></head><body><h1>Hello World!</h1></body></html>',
list_unsubscribe: '<mailto: unsubscribe@example.com?subject=unsubscribe>, <http://www.example.com/unsubscribe.html>',
list_unsubscribe_post: 'List-Unsubscribe=One-Click'
}
var message = pbMail.message(options)
### Adding Attachments and Additional Headers

@@ -200,2 +234,2 @@

## Copyright
Copyright &copy; 2019, Paubox Inc.
Copyright &copy; 2020, Paubox Inc.

@@ -16,2 +16,4 @@ "use strict";

this.attachments = options.attachments;
this.listUnsubscribe = options.list_unsubscribe;
this.listUnsubscribePost = options.list_unsubscribe_post;
}

@@ -18,0 +20,0 @@ }

@@ -0,0 +0,0 @@ "use strict";

@@ -67,2 +67,4 @@ "use strict";

headers["reply-to"] = msg.replyTo;
headers["List-Unsubscribe"] = msg.listUnsubscribe;
headers["List-Unsubscribe-Post"] = msg.listUnsubscribePost;

@@ -69,0 +71,0 @@ content["text/plain"] = msg.plaintext;

@@ -0,0 +0,0 @@ "use strict";

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc