@@ -311,7 +311,7 @@ export class EmailService {
311311 userName : options . userName ,
312312 userEmail : options . userEmail ,
313313 loginUrl : options . loginUrl ,
314- supportEmail : options . supportEmail || 'support @deploystack.com ' ,
314+ supportEmail : options . supportEmail || 'hello @deploystack.io ' ,
315315 } ,
316316 } , logger ) ;
317317 }
@@ -334,7 +334,7 @@ export class EmailService {
334334 userName : options . userName ,
335335 resetUrl : options . resetUrl ,
336336 expirationTime : options . expirationTime ,
337- supportEmail : options . supportEmail || 'support@deploystack.com ' ,
337+ supportEmail : options . supportEmail || 'support@deploystack.io ' ,
338338 } ,
339339 } , logger ) ;
340340 }
@@ -387,8 +387,41 @@ export class EmailService {
387387 changeTime : options . changeTime ,
388388 ipAddress : options . ipAddress ,
389389 userAgent : options . userAgent ,
390- loginUrl : options . loginUrl || 'https://app.deploystack.com/login' ,
391- supportEmail :
options . supportEmail || '[email protected] ' , 390+ loginUrl : options . loginUrl || 'https://cloud.deploystack.io/login' ,
391+ supportEmail :
options . supportEmail || '[email protected] ' , 392+ } ,
393+ } , logger ) ;
394+ }
395+
396+ /**
397+ * Send a test email to verify SMTP configuration (type-safe helper)
398+ */
399+ static async sendTestEmail ( options : {
400+ to : string ;
401+ adminUser : string ;
402+ appUrl ?: string ;
403+ supportEmail ?: string ;
404+ } , logger : FastifyBaseLogger ) : Promise < EmailSendResult > {
405+ const currentDateTime = new Date ( ) . toLocaleString ( 'en-US' , {
406+ timeZone : 'UTC' ,
407+ year : 'numeric' ,
408+ month : 'long' ,
409+ day : 'numeric' ,
410+ hour : '2-digit' ,
411+ minute : '2-digit' ,
412+ second : '2-digit' ,
413+ timeZoneName : 'short'
414+ } ) ;
415+
416+ return this . sendEmail ( {
417+ to : options . to ,
418+ subject : '✅ DeployStack Email Test - Configuration Successful' ,
419+ template : 'test' ,
420+ variables : {
421+ testDateTime : currentDateTime ,
422+ adminUser : options . adminUser ,
423+ appUrl : options . appUrl || 'https://cloud.deploystack.io' ,
424+ supportEmail :
options . supportEmail || '[email protected] ' , 392425 } ,
393426 } , logger ) ;
394427 }
0 commit comments