fix: cli smtp test command add close logic and add time in body

chore/upgrade-rn-0.72.7
moonrailgun 2 years ago
parent 6ab64a7b42
commit 7c8749bee7

@ -1,6 +1,6 @@
{ {
"name": "tailchat-cli", "name": "tailchat-cli",
"version": "1.5.12", "version": "1.5.13",
"description": "A Command line interface of tailchat", "description": "A Command line interface of tailchat",
"bin": { "bin": {
"tailchat": "./bin/cli" "tailchat": "./bin/cli"

@ -84,11 +84,13 @@ export const smtpCommand: CommandModule = {
from: sender, from: sender,
to: target, to: target,
subject: `Test email send in ${new Date().toLocaleDateString()}`, 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); console.log('Send Result:', res);
} catch (err) { } catch (err) {
console.log('Send Failed:', String(err)); console.log('Send Failed:', String(err));
} finally {
transporter.close();
} }
} }
) )

Loading…
Cancel
Save