Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
5586d9a744 | |||
75e3aa33e6 | |||
d94117a606 | |||
59e85680f7 | |||
6cceb84d6b | |||
69f095044a | |||
d1b577275f | |||
426abc0678 | |||
3d282385f3 | |||
afd6bb8479 | |||
6dce86480c | |||
91d271d4d6 | |||
bf6d9ad777 | |||
8eafd81c9f | |||
2b4024b535 | |||
c018435aa1 | |||
b2eb8a2f59 | |||
9e44474348 | |||
0c44743d99 | |||
c9fd14df8b | |||
2a2c7d3423 | |||
10c316c324 | |||
93e926791a | |||
e0f1f1d1ac | |||
74cabfa878 |
@ -12,30 +12,35 @@ stages:
|
||||
- release
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
allow_failure: true
|
||||
|
||||
audit:
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
@ -84,10 +89,9 @@ codequality:
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci command npm install -g typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
@ -107,11 +111,10 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci node install stable
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,17 +2,31 @@
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartsmtp",
|
||||
"shortDescription": "a module for handling smtp stuff",
|
||||
"npmPackagename": "@pushrocks/smartsmtp",
|
||||
"description": "A module for handling SMTP operations such as sending emails via SMTP or sendmail transport.",
|
||||
"npmPackagename": "@push.rocks/smartsmtp",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
"projectDomain": "push.rocks",
|
||||
"keywords": [
|
||||
"SMTP",
|
||||
"email",
|
||||
"nodemailer",
|
||||
"sendmail",
|
||||
"smartmail integration",
|
||||
"TypeScript",
|
||||
"email sending",
|
||||
"email templates",
|
||||
"programming"
|
||||
]
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
19757
package-lock.json
generated
19757
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@ -1,29 +1,29 @@
|
||||
{
|
||||
"name": "@pushrocks/smartsmtp",
|
||||
"version": "1.0.3",
|
||||
"name": "@push.rocks/smartsmtp",
|
||||
"version": "3.0.3",
|
||||
"private": false,
|
||||
"description": "a module for handling smtp stuff",
|
||||
"description": "A module for handling SMTP operations such as sending emails via SMTP or sendmail transport.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
"@gitzone/tstest": "^1.0.15",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"@types/node": "^10.11.7",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tstest": "^1.0.73",
|
||||
"@pushrocks/qenv": "^5.0.2",
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.6.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartmail": "^1.0.18",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"nodemailer": "^6.4.11"
|
||||
"@pushrocks/smartmail": "^1.0.21",
|
||||
"@types/nodemailer": "^6.4.5",
|
||||
"nodemailer": "^6.7.7"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
@ -39,5 +39,21 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"SMTP",
|
||||
"email",
|
||||
"nodemailer",
|
||||
"sendmail",
|
||||
"smartmail integration",
|
||||
"TypeScript",
|
||||
"email sending",
|
||||
"email templates",
|
||||
"programming"
|
||||
],
|
||||
"homepage": "https://code.foss.global/push.rocks/smartsmtp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://code.foss.global/push.rocks/smartsmtp.git"
|
||||
}
|
||||
}
|
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
122
readme.md
122
readme.md
@ -1,39 +1,107 @@
|
||||
# @pushrocks/smartsmtp
|
||||
# @push.rocks/smartsmtp
|
||||
a module for handling smtp stuff
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartsmtp)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartsmtp)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartsmtp)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartsmtp/)
|
||||
## Install
|
||||
|
||||
## Status for master
|
||||
To install `@push.rocks/smartsmtp`, use the following command with npm:
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
```bash
|
||||
npm install @push.rocks/smartsmtp --save
|
||||
```
|
||||
|
||||
Ensure that you are installing the package in a project set up with TypeScript and support for ECMAScript modules, as the usage examples provided will rely on this configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class intellisense
|
||||
`@push.rocks/smartsmtp` simplifies handling SMTP-based emailing in Node.js applications, offering a streamlined interface to create transporters and send emails using popular services like Nodemailer and enhancements for template-based emails via `@pushrocks/smartmail`. This guide walks you through setting up a `Smartsmtp` instance and sending emails.
|
||||
|
||||
## Contribution
|
||||
### Setting Up
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
First, ensure you import the necessary classes from the module. Here's how you set up your imports using ESM syntax:
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
```typescript
|
||||
import { Smartsmtp } from '@push.rocks/smartsmtp';
|
||||
```
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
### Creating SMTP Transport
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
`@push.rocks/smartsmtp` provides two primary ways to set up an SMTP transporter: through direct SMTP server credentials or utilizing the local `sendmail` command.
|
||||
|
||||
#### SMTP Server Credentials
|
||||
|
||||
To connect to an SMTP server directly, you'll need the server address, username, and password. Here's how you can create a `Smartsmtp` instance using SMTP server credentials:
|
||||
|
||||
```typescript
|
||||
// Define your SMTP configuration
|
||||
const smtpOptions = {
|
||||
smtpServer: 'smtp.example.com',
|
||||
smtpUser: 'user@example.com',
|
||||
smtpPassword: 'yourPassword'
|
||||
};
|
||||
|
||||
// Async function to create and use a Smartsmtp instance
|
||||
async function setupSmtp() {
|
||||
const smtpInstance = await Smartsmtp.createSmartsmtpWithRelay(smtpOptions);
|
||||
|
||||
// smtpInstance is now ready to use
|
||||
}
|
||||
```
|
||||
|
||||
#### Using Sendmail
|
||||
|
||||
If you wish to use the local `sendmail` command, which is common in UNIX environments, you can create a `Smartsmtp` instance dedicated to that:
|
||||
|
||||
```typescript
|
||||
async function setupSendmail() {
|
||||
const sendmailInstance = await Smartsmtp.createSmartsmtpSendmail();
|
||||
|
||||
// sendmailInstance is now ready to use for sending emails
|
||||
}
|
||||
```
|
||||
|
||||
### Sending Emails
|
||||
|
||||
With a `Smartsmtp` instance ready, you can send emails. This requires creating a `Smartmail` instance (from the `@pushrocks/smartmail` package) that defines the email configuration, including subjects, recipients, and body content.
|
||||
|
||||
```typescript
|
||||
import { Smartmail } from '@pushrocks/smartmail';
|
||||
|
||||
async function sendEmail(smtpInstance: Smartsmtp) {
|
||||
// Create a Smartmail instance
|
||||
const myEmail = new Smartmail({
|
||||
from: 'me@example.com',
|
||||
subject: 'Test Email',
|
||||
body: 'This is a test email sent using @push.rocks/smartsmtp.'
|
||||
});
|
||||
|
||||
// Use the smtpInstance to send the email
|
||||
const result = await smtpInstance.sendSmartMail(myEmail, 'recipient@example.com');
|
||||
|
||||
console.log(result); // Check the result
|
||||
}
|
||||
```
|
||||
|
||||
In the example above, `Smartmail` is utilized to define the base content of the email being sent. The `sendSmartMail` method of `Smartsmtp` takes this email configuration, alongside recipient details, and performs the sending operation.
|
||||
|
||||
This completes the basic usage guide for `@push.rocks/smartsmtp`. With these steps, you can integrate straightforward SMTP email sending capabilities into your Node.js applications, leveraging modern TypeScript syntax and ESM modules. For further customization and advanced features, refer to the documentation of Nodemailer and `@pushrocks/smartmail`.
|
||||
|
||||
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
### Trademarks
|
||||
|
||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
|
21
test/test.ts
21
test/test.ts
@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartsmtp from '../ts/index';
|
||||
import * as smartsmtp from '../ts/index.js';
|
||||
|
||||
import { Qenv } from '@pushrocks/qenv';
|
||||
import * as smartmail from '@pushrocks/smartmail';
|
||||
@ -9,15 +9,15 @@ const testQenv = new Qenv('./', './.nogit');
|
||||
let testSmartsmtp: smartsmtp.Smartsmtp;
|
||||
|
||||
tap.test('should create a valid instance of Smartsmtp', async () => {
|
||||
testSmartsmtp = new smartsmtp.Smartsmtp({
|
||||
testSmartsmtp = await smartsmtp.Smartsmtp.createSmartsmtpWithRelay({
|
||||
smtpServer: testQenv.getEnvVarOnDemand('SMTP_SERVER'),
|
||||
smtpUser: testQenv.getEnvVarOnDemand('SMTP_USER'),
|
||||
smtpPassword: testQenv.getEnvVarOnDemand('SMTP_PASSWORD'),
|
||||
});
|
||||
expect(testSmartsmtp).to.be.instanceOf(smartsmtp.Smartsmtp);
|
||||
expect(testSmartsmtp).toBeInstanceOf(smartsmtp.Smartsmtp);
|
||||
});
|
||||
|
||||
tap.test('should send a message', async () => {
|
||||
tap.test('should send a message with empty body', async () => {
|
||||
const result = await testSmartsmtp.sendSmartMail(
|
||||
new smartmail.Smartmail({
|
||||
body: '',
|
||||
@ -29,4 +29,17 @@ tap.test('should send a message', async () => {
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
tap.test('should create a direct smartsmtp transport', async () => {
|
||||
const smartsmtpInstance = await smartsmtp.Smartsmtp.createSmartsmtpSendmail();
|
||||
const result = await smartsmtpInstance.sendSmartMail(
|
||||
new smartmail.Smartmail({
|
||||
body: 'hi there',
|
||||
from: 'phil@lossless.com',
|
||||
subject: 'this is a sendmail test message',
|
||||
}),
|
||||
'phil@kunz.io'
|
||||
);
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartsmtp',
|
||||
version: '3.0.3',
|
||||
description: 'a module for handling smtp stuff'
|
||||
}
|
45
ts/index.ts
45
ts/index.ts
@ -1,44 +1 @@
|
||||
import * as plugins from './smartsmtp.plugins';
|
||||
|
||||
export interface ISmartSmtpOptions {
|
||||
smtpServer: string;
|
||||
smtpUser: string;
|
||||
smtpPassword: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use it to send mails via smtp
|
||||
*/
|
||||
export class Smartsmtp {
|
||||
public nodemailerTransport: plugins.nodemailer.Transporter;
|
||||
constructor(optionsArg: ISmartSmtpOptions) {
|
||||
this.nodemailerTransport = plugins.nodemailer.createTransport({
|
||||
host: optionsArg.smtpServer,
|
||||
port: 465,
|
||||
secure: true, // upgrade later with STARTTLS
|
||||
auth: {
|
||||
user: optionsArg.smtpUser,
|
||||
pass: optionsArg.smtpPassword,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* sends a SmartMail
|
||||
*/
|
||||
public async sendSmartMail(
|
||||
smartmailArg: plugins.smartmail.Smartmail<any>,
|
||||
toArg: string,
|
||||
dataArg = {}
|
||||
) {
|
||||
const message = {
|
||||
from: smartmailArg.options.from,
|
||||
to: toArg,
|
||||
subject: smartmailArg.getSubject(dataArg),
|
||||
text: smartmailArg.getBody(dataArg),
|
||||
html: smartmailArg.getBody(dataArg),
|
||||
};
|
||||
const response = await this.nodemailerTransport.sendMail(message);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
export * from './smartsmtp.classes.smartsmtp.js';
|
||||
|
69
ts/smartsmtp.classes.smartsmtp.ts
Normal file
69
ts/smartsmtp.classes.smartsmtp.ts
Normal file
@ -0,0 +1,69 @@
|
||||
import * as plugins from './smartsmtp.plugins.js';
|
||||
|
||||
export interface ISmartSmtpOptions {
|
||||
smtpServer: string;
|
||||
smtpUser: string;
|
||||
smtpPassword: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use it to send mails via smtp
|
||||
*/
|
||||
export class Smartsmtp {
|
||||
public static async createSmartsmtpWithRelay(optionsArg: ISmartSmtpOptions) {
|
||||
const nodemailerTransport = plugins.nodemailer.createTransport({
|
||||
host: optionsArg.smtpServer,
|
||||
port: 465,
|
||||
secure: true, // upgrade later with STARTTLS
|
||||
auth: {
|
||||
user: optionsArg.smtpUser,
|
||||
pass: optionsArg.smtpPassword,
|
||||
},
|
||||
});
|
||||
return new Smartsmtp(nodemailerTransport);
|
||||
}
|
||||
|
||||
public static async createSmartsmtpSendmail() {
|
||||
const nodemailerTransport = plugins.nodemailer.createTransport({
|
||||
sendmail: true,
|
||||
newline: 'unix',
|
||||
});
|
||||
return new Smartsmtp(nodemailerTransport);
|
||||
}
|
||||
|
||||
public nodemailerTransport: plugins.nodemailer.Transporter;
|
||||
constructor(transporterArg: plugins.nodemailer.Transporter) {
|
||||
this.nodemailerTransport = transporterArg;
|
||||
}
|
||||
|
||||
/**
|
||||
* sends a SmartMail
|
||||
*/
|
||||
public async sendSmartMail(
|
||||
smartmailArg: plugins.smartmail.Smartmail<any>,
|
||||
toArg: string,
|
||||
dataArg = {}
|
||||
) {
|
||||
const message: plugins.nodemailer.SendMailOptions = {
|
||||
from: smartmailArg.options.from,
|
||||
to: toArg,
|
||||
subject: smartmailArg.getSubject(dataArg),
|
||||
text: smartmailArg.getBody(dataArg),
|
||||
html: smartmailArg.getBody(dataArg),
|
||||
attachments: [],
|
||||
};
|
||||
|
||||
// lets add attachments from smartmailArg
|
||||
for (const attachment of smartmailArg.attachments) {
|
||||
message.attachments.push({
|
||||
filename: attachment.parsedPath.base,
|
||||
content: attachment.contentBuffer,
|
||||
});
|
||||
}
|
||||
|
||||
const response = await this.nodemailerTransport.sendMail(message).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
return response;
|
||||
}
|
||||
}
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Reference in New Issue
Block a user