Skip to content

Commit

Permalink
feat: updated preview screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed May 17, 2023
1 parent c3f75db commit d5a6720
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![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][]!

## Table of Contents
Expand All @@ -20,7 +20,6 @@
* [Custom Preview Template and Stylesheets](#custom-preview-template-and-stylesheets)
* [Debugging](#debugging)
* [Options](#options)
* [Contributors](#contributors)
* [License](#license)


Expand All @@ -32,7 +31,7 @@

### Browser

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


## Install
Expand Down Expand Up @@ -78,8 +77,8 @@ const transport = nodemailer.createTransport({

// <https://nodemailer.com/message/>
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',
html: '<p>Hello world</p>',
text: 'Hello world',
Expand Down Expand Up @@ -136,23 +135,16 @@ NODE_DEBUG=preview-email node app.js
* `returnHTML` (Boolean) - whether or not to return HTML only – and subsequently not write nor open the file preview file (defaults to `false`)


## Contributors

| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |


## License

[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)
[MIT](LICENSE) © [Forward Email](https://forwardemail.net)


##

[npm]: https://www.npmjs.com/

[email-templates]: https://github.com/niftylettuce/email-templates
[email-templates]: https://github.com/forwardemail/email-templates

[node]: https://nodejs.org/

Expand Down
Binary file modified media/browser.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"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/)",
"author": "Forward Email (https://forwardemail.net)",
"bugs": {
"url": "https://github.com/forwardemail/preview-email/issues",
"email": "niftylettuce@gmail.com"
Expand Down
16 changes: 8 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ test('returns function', (t) => {

test('opens a preview email', async (t) => {
const message = {
from: 'niftylettuce <niftylettuce+from@gmail.com>',
to: 'niftylettuce+to@gmail.com, niftylettuce <niftylettuce+test@gmail.com>',
from: 'linus <linus+from@gmail.com>',
to: 'linus+to@gmail.com, linus <linus+test@gmail.com>',
subject: 'Hello world',
html: `<p>Hello world</p>`,
text: 'Hello world',
replyTo: 'niftylettuce <niftylettuce+replyto@gmail.com>',
replyTo: 'linus <linus+replyto@gmail.com>',
inReplyTo: 'in reply to',
attachments: [
{ filename: 'hello-world.txt', content: 'Hello world' },
Expand All @@ -32,7 +32,7 @@ test('opens a preview email', async (t) => {
'X-Some-Custom-Header': 'Some Custom Value'
},
list: {
unsubscribe: 'https://niftylettuce.com/unsubscribe'
unsubscribe: 'https://linus.com/unsubscribe'
}
};
const response = await transport.sendMail(message);
Expand All @@ -42,12 +42,12 @@ test('opens a preview email', async (t) => {

test('returns HTML only', async (t) => {
const message = {
from: 'niftylettuce <niftylettuce+from@gmail.com>',
to: 'niftylettuce+to@gmail.com, niftylettuce <niftylettuce+test@gmail.com>',
from: 'linus <linus+from@gmail.com>',
to: 'linus+to@gmail.com, linus <linus+test@gmail.com>',
subject: 'Hello world',
html: `<p>Hello world</p>`,
text: 'Hello world',
replyTo: 'niftylettuce <niftylettuce+replyto@gmail.com>',
replyTo: 'linus <linus+replyto@gmail.com>',
inReplyTo: 'in reply to',
attachments: [
{ filename: 'hello-world.txt', content: 'Hello world' },
Expand All @@ -62,7 +62,7 @@ test('returns HTML only', async (t) => {
'X-Some-Custom-Header': 'Some Custom Value'
},
list: {
unsubscribe: 'https://niftylettuce.com/unsubscribe'
unsubscribe: 'https://linus.com/unsubscribe'
}
};
const response = await transport.sendMail(message);
Expand Down

0 comments on commit d5a6720

Please sign in to comment.