nuxt-mail 3.0.18 → 3.0.22
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.js +9 -5
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -208,7 +208,7 @@ Missing something? Add your service here via a [pull request](https://github.com
|
|
|
208
208
|
|
|
209
209
|
## Debugging mail errors
|
|
210
210
|
|
|
211
|
-
If the mail doesn't get sent, you can debug the error using the browser developer tools. If a `
|
|
211
|
+
If the mail doesn't get sent, you can debug the error using the browser developer tools. If a `400` error is thrown (check out the console output), you can find the error message in the Network tab. For Chrome users, open the Network tab, then find the "send" request. Open it and select the "Response" tab. There it should show the error message. In most cases, it is related to authentication with the SMTP server.
|
|
212
212
|
|
|
213
213
|
## Open questions
|
|
214
214
|
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ function _default(moduleOptions) {
|
|
|
74
74
|
...(_options$message$req$ = options.message[req.body.config], (0, _omit.default)(['name'])(_options$message$req$))
|
|
75
75
|
});
|
|
76
76
|
} catch (error) {
|
|
77
|
-
return res.status(
|
|
77
|
+
return res.status(400).send(error.message);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return res.sendStatus(200);
|
package/dist/plugin.js
CHANGED
|
@@ -5,11 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _default = (context, inject) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
8
|
+
var _default = (context, inject) => inject('mail', {
|
|
9
|
+
send: async config => {
|
|
10
|
+
try {
|
|
11
|
+
await context.app.$axios.$post('/mail/send', config);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
throw new Error(error.response.data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
13
17
|
|
|
14
18
|
exports.default = _default;
|
|
15
19
|
module.exports = exports.default;
|
package/package.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-mail",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.22",
|
|
4
4
|
"description": "Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"api",
|
|
7
|
-
"contact",
|
|
8
6
|
"email",
|
|
9
|
-
"
|
|
7
|
+
"express",
|
|
8
|
+
"frontend",
|
|
9
|
+
"inject",
|
|
10
|
+
"javascript",
|
|
10
11
|
"mail",
|
|
11
12
|
"nodemailer",
|
|
13
|
+
"npm",
|
|
14
|
+
"npm-package",
|
|
12
15
|
"nuxt",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
16
|
+
"nuxt-module",
|
|
17
|
+
"nuxtjs",
|
|
18
|
+
"nuxtjs-module",
|
|
19
|
+
"server",
|
|
20
|
+
"webdevelopment"
|
|
17
21
|
],
|
|
18
22
|
"repository": "dword-design/nuxt-mail",
|
|
19
23
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
"@dword-design/tester-plugin-nodemailer-mock": "^1.0.0",
|
|
47
51
|
"@dword-design/tester-plugin-puppeteer": "^2.0.0",
|
|
48
52
|
"@nuxtjs/axios": "^5.13.1",
|
|
49
|
-
"axios": "^0.
|
|
53
|
+
"axios": "^0.25.0",
|
|
50
54
|
"depcheck-package-name": "^2.0.0",
|
|
51
55
|
"nodemailer-mock": "^1.5.4",
|
|
52
56
|
"nuxt": "^2.15.3",
|