From 7c8749bee7de66ef00f20cfdbf0400547900e2f0 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 26 Nov 2023 16:40:03 +0800 Subject: [PATCH] fix: cli smtp test command add close logic and add time in body --- apps/cli/package.json | 2 +- apps/cli/src/commands/smtp.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/cli/package.json b/apps/cli/package.json index 4a22bc1e8d1..998cfcec804 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,6 +1,6 @@ { "name": "tailchat-cli", - "version": "1.5.12", + "version": "1.5.13", "description": "A Command line interface of tailchat", "bin": { "tailchat": "./bin/cli" diff --git a/apps/cli/src/commands/smtp.ts b/apps/cli/src/commands/smtp.ts index 3f890f48611..47927acd143 100644 --- a/apps/cli/src/commands/smtp.ts +++ b/apps/cli/src/commands/smtp.ts @@ -84,11 +84,13 @@ export const smtpCommand: CommandModule = { from: sender, to: target, subject: `Test email send in ${new Date().toLocaleDateString()}`, - text: 'This is a test email send by tailchat-cli', + text: `This is a test email send by tailchat-cli at ${new Date().toLocaleString()}`, }); console.log('Send Result:', res); } catch (err) { console.log('Send Failed:', String(err)); + } finally { + transporter.close(); } } )