pixl-mail 1.0.8 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Overview
2
2
 
3
- This module provides a very simple e-mail sender, which leans heavily on the awesome [nodemailer](https://nodemailer.com/) package. It layers on the ability to pass in a complete e-mail message with headers and body in one string (or file), and optionally perform placeholder substitution using [substitute()](https://www.npmjs.com/package/pixl-tools#substitute) from the [pixl-tools](https://www.npmjs.com/package/pixl-tools) package. Auto-detects HTML or plain text e-mail body, and supports custom headers and attachments as well.
3
+ This module provides a very simple e-mail sender, which leans heavily on the awesome [nodemailer](https://nodemailer.com/) package. It layers on the ability to pass in a complete e-mail message with headers and body in one string (or file), and optionally perform placeholder substitution using [sub()](https://www.npmjs.com/package/pixl-tools#sub) from the [pixl-tools](https://www.npmjs.com/package/pixl-tools) package. Auto-detects HTML or plain text e-mail body, and supports custom headers and attachments as well.
4
4
 
5
5
  # Usage
6
6
 
@@ -43,7 +43,7 @@ For multiple recipients, simply separate them by commas on the `To` line. You c
43
43
 
44
44
  ## Placeholder Substitution
45
45
 
46
- The library supports a simple e-mail templating system, where you can insert `[bracket_placeholders]` in your e-mail message, and have the library fill them with appropriate content from a separate object. This feature uses the [substitute()](https://www.npmjs.com/package/pixl-tools#substitute) function from the [pixl-tools](https://www.npmjs.com/package/pixl-tools) package.
46
+ The library supports a simple e-mail templating system, where you can insert `[bracket_placeholders]` in your e-mail message, and have the library fill them with appropriate content from a separate object. This feature uses the [sub()](https://www.npmjs.com/package/pixl-tools#sub) function from the [pixl-tools](https://www.npmjs.com/package/pixl-tools) package.
47
47
 
48
48
  As an example, imagine a welcome e-mail for a new user who has signed up for your app. You have the welcome e-mail "template" stored separately, and want to fill in the user's e-mail address, full name and username at sending time. Here is how to do this:
49
49
 
@@ -79,7 +79,7 @@ Dear Joseph Huckaby,
79
79
  Welcome to My App! Your username is 'jhuckaby'.
80
80
  ```
81
81
 
82
- You can actually use a complex hash / array tree of arguments, and then specify `[/filesystem/style/paths]` in your placeholders. See the [substitute()](https://www.npmjs.com/package/pixl-tools#substitute) docs for details.
82
+ You can actually use a complex hash / array tree of arguments, and then specify `[filesystem/style/paths]` or `[dot.style.paths]` in your placeholders. See the [sub()](https://www.npmjs.com/package/pixl-tools#sub) docs for details.
83
83
 
84
84
  ## Loading From Files
85
85
 
@@ -164,9 +164,9 @@ mail.setOptions({
164
164
 
165
165
  # License
166
166
 
167
- The MIT License (MIT)
167
+ **The MIT License (MIT)**
168
168
 
169
- Copyright (c) 2015 - 2017 Joseph Huckaby.
169
+ *Copyright (c) 2015 - 2019 Joseph Huckaby.*
170
170
 
171
171
  Permission is hereby granted, free of charge, to any person obtaining a copy
172
172
  of this software and associated documentation files (the "Software"), to deal
package/mail.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Simple SMTP Email Sender
2
- // Copyright (c) 2015 Joseph Huckaby
2
+ // Copyright (c) 2015 - 2019 Joseph Huckaby
3
3
  // Released under the MIT License
4
4
 
5
5
  var fs = require('fs');
@@ -59,7 +59,7 @@ module.exports = Class.create({
59
59
  if (!callback) callback = function() {};
60
60
 
61
61
  // perform placeholder substitution on body
62
- if (args) data = Tools.substitute( data, args );
62
+ if (args) data = Tools.sub( data, args );
63
63
 
64
64
  // fix line endings
65
65
  data = data.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-mail",
3
- "version": "1.0.8",
3
+ "version": "1.0.12",
4
4
  "description": "A very simple class for sending e-mail via SMTP.",
5
5
  "author": "Joseph Huckaby <jhuckaby@gmail.com>",
6
6
  "homepage": "https://github.com/jhuckaby/pixl-mail",
@@ -19,9 +19,9 @@
19
19
  "smtp"
20
20
  ],
21
21
  "dependencies": {
22
- "nodemailer": "^4.4.1",
23
- "pixl-tools": ">=1.0.0",
24
- "pixl-class": ">=1.0.0"
22
+ "nodemailer": "6.6.1",
23
+ "pixl-tools": "^1.0.19",
24
+ "pixl-class": "^1.0.0"
25
25
  },
26
26
  "devDependencies": {
27
27
 
package/.npmignore DELETED
@@ -1,2 +0,0 @@
1
- .gitignore
2
- node_modules/