Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

preview-email

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preview-email - npm Package Compare versions

Comparing version 3.0.15 to 3.0.16

11

index.js

@@ -41,2 +41,3 @@ const childProcess = require('child_process');

simpleParser: {},
hasDownloadOriginalButton: true,
...options

@@ -51,10 +52,12 @@ };

raw = message;
base64 = message.toString('base64');
if (options.hasDownloadOriginalButton) base64 = message.toString('base64');
} else if (typeof message === 'string') {
raw = message;
base64 = Buffer.from(message).toString('base64');
if (options.hasDownloadOriginalButton)
base64 = Buffer.from(message).toString('base64');
} else if (typeof message === 'object') {
const response = await transport.sendMail(message);
raw = response.message;
base64 = Buffer.from(response.message).toString('base64');
if (options.hasDownloadOriginalButton)
base64 = Buffer.from(response.message).toString('base64');
} else {

@@ -65,3 +68,3 @@ throw new TypeError('Message argument is required');

const parsed = await simpleParser(raw, options.simpleParser);
parsed.base64 = base64;
if (options.hasDownloadOriginalButton) parsed.base64 = base64;

@@ -68,0 +71,0 @@ const html = await renderFilePromise(

{
"name": "preview-email",
"description": "Automatically opens your browser and iOS Simulator to preview Node.js email messages sent with Nodemailer. Made for Forward Email and Lad!",
"version": "3.0.15",
"version": "3.0.16",
"author": "Forward Email (https://forwardemail.net)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -136,2 +136,3 @@ # preview-email

* `returnHTML` (Boolean) - whether or not to return HTML only – and subsequently not write nor open the file preview file (defaults to `false`)
* `hasDownloadOriginalButton` (Boolean) - whether or not to render a "Download Original" button to download via base64 inline onclick JavaScript (defaults to `true`)

@@ -138,0 +139,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc