preview-email
Advanced tools
Comparing version 3.0.13 to 3.0.14
@@ -47,9 +47,13 @@ const childProcess = require('child_process'); | ||
let raw; | ||
let base64; | ||
if (Buffer.isBuffer(message)) { | ||
raw = message; | ||
base64 = message.toString('base64'); | ||
} else if (typeof message === 'string') { | ||
raw = message; | ||
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'); | ||
} else { | ||
@@ -60,2 +64,3 @@ throw new TypeError('Message argument is required'); | ||
const parsed = await simpleParser(raw, options.simpleParser); | ||
parsed.base64 = base64; | ||
@@ -62,0 +67,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.13", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
"version": "3.0.14", | ||
"author": "Forward Email (https://forwardemail.net)", | ||
"bugs": { | ||
@@ -7,0 +7,0 @@ "url": "https://github.com/forwardemail/preview-email/issues", |
@@ -7,5 +7,5 @@ # preview-email | ||
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org) | ||
[![license](https://img.shields.io/github/license/niftylettuce/preview-email.svg)]() | ||
[![license](https://img.shields.io/github/license/forward-email/preview-email.svg)]() | ||
> Automatically opens your browser and iOS Simulator to preview [Node.js][node] email messages sent with [Nodemailer][]. Made for [Forward Email][forward-email] [Lad][]! | ||
> Automatically opens your browser and iOS Simulator to preview [Node.js][node] email messages sent with [Nodemailer][]. Made for [Forward Email][forward-email] and [Lad][]! | ||
@@ -24,3 +24,2 @@ | ||
* [Options](#options) | ||
* [Contributors](#contributors) | ||
* [License](#license) | ||
@@ -37,3 +36,3 @@ | ||
<a href="media/browser.png" target="_blank"><img src="media/browser.png" width="799" height="2036" alt="Browser Screenshot" /></a> | ||
<a href="media/browser.png" target="_blank"><img src="media/browser.png" width="617" height="939" alt="Browser Screenshot" /></a> | ||
@@ -84,4 +83,4 @@ | ||
const message = { | ||
from: 'niftylettuce+from@gmail.com', | ||
to: 'niftylettuce+to@gmail.com', | ||
from: 'linus+from@gmail.com', | ||
to: 'linus+to@gmail.com', | ||
subject: 'Hello world', | ||
@@ -143,12 +142,5 @@ html: '<p>Hello world</p>', | ||
## Contributors | ||
| Name | Website | | ||
| -------------- | -------------------------- | | ||
| **Nick Baugh** | <http://niftylettuce.com/> | | ||
## License | ||
[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/) | ||
[MIT](LICENSE) © [Forward Email](https://forwardemail.net) | ||
@@ -160,3 +152,3 @@ | ||
[email-templates]: https://github.com/niftylettuce/email-templates | ||
[email-templates]: https://github.com/forwardemail/email-templates | ||
@@ -163,0 +155,0 @@ [node]: https://nodejs.org/ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21987
219
164