Skip to content

Commit 677d588

Browse files
committed
Release 0.0.5
1 parent 095b29d commit 677d588

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ const message = {
6060
attachments: [ { filename: 'hello-world.txt', content: 'Hello world' } ]
6161
};
6262

63+
// note that `attachments` will not be parsed unless you use
64+
// `previewEmail` with the results of `transport.sendMail`
65+
// e.g. `previewEmail(JSON.parse(res.message));` where `res`
66+
// is `const res = await transport.sendMail(message);`
6367
previewEmail(message).then(console.log).catch(console.error);
6468

6569
transport.sendMail(message).then(console.log).catch(console.error);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "preview-email",
33
"description":
44
"Automatically opens your browser to preview Node.js email messages sent with Nodemailer. Made for Lad!",
5-
"version": "0.0.4",
5+
"version": "0.0.5",
66
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
77
"bugs": {
88
"url": "https://github.com/niftylettuce/preview-email/issues",
@@ -85,6 +85,7 @@
8585
"*.md": ["remark . -qfo", "git add"]
8686
},
8787
"main": "lib/index.js",
88+
"files": ["lib", "template.pug"],
8889
"remarkConfig": {
8990
"plugins": ["preset-github"]
9091
},

src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ const previewEmail = (message, id, open = true) => {
3434

3535
res.message = JSON.parse(res.message);
3636

37-
console.log('res.message', res.message);
38-
3937
const html = await renderFilePromise(
4038
templateFilePath,
4139
Object.assign(res.message, {

0 commit comments

Comments
 (0)