File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,16 @@ export default defineNuxtConfig({
21
21
} ,
22
22
23
23
nodemailer : {
24
- secure : false ,
24
+ secure : Boolean ( process . env . SMTP_USER && process . env . SMTP_PASS ) ,
25
25
from : process . env . SMTP_FROM ,
26
26
host : process . env . SMTP_SERVER ,
27
27
port : Number ( process . env . SMTP_PORT ) ,
28
+ auth : process . env . SMTP_USER && process . env . SMTP_PASS
29
+ ? {
30
+ user : process . env . SMTP_USER ,
31
+ pass : process . env . SMTP_PASS ,
32
+ }
33
+ : undefined ,
28
34
} ,
29
35
30
36
nitro : {
@@ -242,6 +248,12 @@ export default defineNuxtConfig({
242
248
tasks : true ,
243
249
} ,
244
250
251
+ tasks : {
252
+ 'email:test' : {
253
+ description : 'Test email sending' ,
254
+ } ,
255
+ } ,
256
+
245
257
devProxy : {
246
258
host : 'localhost' ,
247
259
} ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @thecodeorigin/nuxt" ,
3
3
"type" : " module" ,
4
- "version" : " 2.7.0 " ,
4
+ "version" : " 2.7.1 " ,
5
5
"publishConfig" : {
6
6
"registry" : " https://registry.npmjs.org" ,
7
7
"access" : " public"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default defineTask({
8
8
9
9
await sendMail ( {
10
10
subject : 'Hehe test' ,
11
-
11
+
12
12
html : 'This is a test email' ,
13
13
} )
14
14
You can’t perform that action at this time.
0 commit comments