nuxt-mail 3.0.13 → 3.0.17
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 +36 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- /TITLE -->
|
|
4
4
|
|
|
5
5
|
<!-- BADGES/ -->
|
|
6
|
-
|
|
6
|
+
<p>
|
|
7
7
|
<a href="https://npmjs.org/package/nuxt-mail">
|
|
8
8
|
<img
|
|
9
9
|
src="https://img.shields.io/npm/v/nuxt-mail.svg"
|
|
@@ -69,7 +69,7 @@ $ yarn add nuxt-mail
|
|
|
69
69
|
|
|
70
70
|
## Usage
|
|
71
71
|
|
|
72
|
-
Add the module to your `nuxt.config.js`. We also have to install the [@nuxtjs/axios](https://www.npmjs.com/package/@nuxtjs/axios) module because it is used internally to call the server route:
|
|
72
|
+
Add the module to the `modules` array in your `nuxt.config.js`. Note to add it to `modules` instead of `buildModules`, otherwise the server route will not be generated. We also have to install the [@nuxtjs/axios](https://www.npmjs.com/package/@nuxtjs/axios) module because it is used internally to call the server route:
|
|
73
73
|
```js
|
|
74
74
|
export default {
|
|
75
75
|
modules: [
|
|
@@ -178,11 +178,43 @@ export default {
|
|
|
178
178
|
}
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
Also, the module not work for static sites (via `nuxt generate`) because the module creates a server route.
|
|
181
|
+
Also, the module does not work for static sites (via `nuxt generate`) because the module creates a server route.
|
|
182
|
+
|
|
183
|
+
## Setting up popular email services
|
|
184
|
+
|
|
185
|
+
### Gmail
|
|
186
|
+
|
|
187
|
+
You have to setup an [app-specific password](https://myaccount.google.com/apppasswords) to log into the SMTP server. Then, add the following config to your `nuxt-mail` config:
|
|
188
|
+
|
|
189
|
+
```js
|
|
190
|
+
export default {
|
|
191
|
+
modules: [
|
|
192
|
+
'@nuxtjs/axios',
|
|
193
|
+
['nuxt-mail', {
|
|
194
|
+
// ...
|
|
195
|
+
smtp: {
|
|
196
|
+
service: 'gmail',
|
|
197
|
+
auth: {
|
|
198
|
+
user: 'foo@gmail.com',
|
|
199
|
+
pass: '<app-specific password>',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
}],
|
|
203
|
+
],
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Missing something? Add your service here via a [pull request](https://github.com/dword-design/nuxt-mail/pulls).
|
|
182
208
|
|
|
183
209
|
## Debugging mail errors
|
|
184
210
|
|
|
185
|
-
If the mail doesn't get sent, you can debug the error using the browser developer tools. If a 500 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.
|
|
211
|
+
If the mail doesn't get sent, you can debug the error using the browser developer tools. If a `500` 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
|
+
|
|
213
|
+
## Open questions
|
|
214
|
+
|
|
215
|
+
### "Self signed certificate in certificate chain" error
|
|
216
|
+
|
|
217
|
+
There is [an issue](https://github.com/dword-design/nuxt-mail/issues/62) where the above error is thrown. If someone knows a solution for this, it is warmly welcome 😍.
|
|
186
218
|
|
|
187
219
|
<!-- LICENSE/ -->
|
|
188
220
|
## Contribute
|
package/package.json
CHANGED