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({
2121 } ,
2222
2323 nodemailer : {
24- secure : false ,
24+ secure : Boolean ( process . env . SMTP_USER && process . env . SMTP_PASS ) ,
2525 from : process . env . SMTP_FROM ,
2626 host : process . env . SMTP_SERVER ,
2727 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 ,
2834 } ,
2935
3036 nitro : {
@@ -242,6 +248,12 @@ export default defineNuxtConfig({
242248 tasks : true ,
243249 } ,
244250
251+ tasks : {
252+ 'email:test' : {
253+ description : 'Test email sending' ,
254+ } ,
255+ } ,
256+
245257 devProxy : {
246258 host : 'localhost' ,
247259 } ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @thecodeorigin/nuxt" ,
33 "type" : " module" ,
4- "version" : " 2.7.0 " ,
4+ "version" : " 2.7.1 " ,
55 "publishConfig" : {
66 "registry" : " https://registry.npmjs.org" ,
77 "access" : " public"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default defineTask({
88
99 await sendMail ( {
1010 subject : 'Hehe test' ,
11- 11+ 1212 html : 'This is a test email' ,
1313 } )
1414
You can’t perform that action at this time.
0 commit comments