🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@spinajs/email

Package Overview
Dependencies
Maintainers
0
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/email - npm Package Compare versions

Comparing version

to
2.0.276

4

lib/cjs/cli/SendEmail.d.ts

@@ -11,2 +11,6 @@ import { CliCommand } from '@spinajs/cli';

content?: string;
deferred?: boolean;
scheduleCron?: string;
scheduleDelay?: number;
scheduleRepeat?: number;
}

@@ -13,0 +17,0 @@ export declare class SendEmailCommand extends CliCommand {

@@ -52,3 +52,3 @@ "use strict";

}
await emails.send({
const email = {
from: options.from,

@@ -61,3 +61,14 @@ to: options.to.split(','),

text: options.content,
});
schedule: {
cron: options.scheduleCron,
delay: options.scheduleDelay,
repeat: options.scheduleRepeat,
},
};
if (options.deferred) {
await emails.sendDeferred(email);
}
else {
await emails.send(email);
}
this.Log.success(`Email send succesyfully to: ${options.to}, from: ${options.from}, subject: ${options.subject}`);

@@ -83,4 +94,8 @@ }

(0, cli_1.Option)('-s, --subject [model]', true, 'subject'),
(0, cli_1.Option)('-c, --content [content]', false, 'text content if template is not provided')
(0, cli_1.Option)('-ct, --content [content]', false, 'text content if template is not provided'),
(0, cli_1.Option)('-sd, --schedule-delay', false, 'email delay'),
(0, cli_1.Option)('-sc, --schedule-cron', false, 'send email with cron schedule'),
(0, cli_1.Option)('-sr, --schedule-repeat', false, 'How many times to send'),
(0, cli_1.Option)('-df, --deferred', false, 'send email deferred ( send using queue & email srv')
], SendEmailCommand);
//# sourceMappingURL=SendEmail.js.map

@@ -11,2 +11,6 @@ import { CliCommand } from '@spinajs/cli';

content?: string;
deferred?: boolean;
scheduleCron?: string;
scheduleDelay?: number;
scheduleRepeat?: number;
}

@@ -13,0 +17,0 @@ export declare class SendEmailCommand extends CliCommand {

@@ -26,3 +26,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

}
await emails.send({
const email = {
from: options.from,

@@ -35,3 +35,14 @@ to: options.to.split(','),

text: options.content,
});
schedule: {
cron: options.scheduleCron,
delay: options.scheduleDelay,
repeat: options.scheduleRepeat,
},
};
if (options.deferred) {
await emails.sendDeferred(email);
}
else {
await emails.send(email);
}
this.Log.success(`Email send succesyfully to: ${options.to}, from: ${options.from}, subject: ${options.subject}`);

@@ -56,5 +67,9 @@ }

Option('-s, --subject [model]', true, 'subject'),
Option('-c, --content [content]', false, 'text content if template is not provided')
Option('-ct, --content [content]', false, 'text content if template is not provided'),
Option('-sd, --schedule-delay', false, 'email delay'),
Option('-sc, --schedule-cron', false, 'send email with cron schedule'),
Option('-sr, --schedule-repeat', false, 'How many times to send'),
Option('-df, --deferred', false, 'send email deferred ( send using queue & email srv')
], SendEmailCommand);
export { SendEmailCommand };
//# sourceMappingURL=SendEmail.js.map

16

package.json
{
"name": "@spinajs/email",
"version": "2.0.275",
"version": "2.0.276",
"description": "sending emails easy & reliable way",

@@ -58,9 +58,9 @@

"dependencies": {
"@spinajs/cli": "^2.0.275",
"@spinajs/configuration": "^2.0.275",
"@spinajs/di": "^2.0.275",
"@spinajs/exceptions": "^2.0.275",
"@spinajs/intl": "^2.0.275",
"@spinajs/log": "^2.0.275",
"@spinajs/queue": "^2.0.275",
"@spinajs/cli": "^2.0.276",
"@spinajs/configuration": "^2.0.276",
"@spinajs/di": "^2.0.276",
"@spinajs/exceptions": "^2.0.276",
"@spinajs/intl": "^2.0.276",
"@spinajs/log": "^2.0.276",
"@spinajs/queue": "^2.0.276",
"luxon": "^3.2.1"

@@ -67,0 +67,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet