6 Commits

Author SHA1 Message Date
9e44474348 1.0.7 2020-08-15 12:58:02 +00:00
0c44743d99 fix(core): update 2020-08-15 12:58:01 +00:00
c9fd14df8b 1.0.6 2020-08-12 16:37:02 +00:00
2a2c7d3423 fix(core): update 2020-08-12 16:37:01 +00:00
10c316c324 1.0.5 2020-08-12 16:07:28 +00:00
93e926791a fix(core): update 2020-08-12 16:07:27 +00:00
4 changed files with 37 additions and 15 deletions

View File

@ -26,16 +26,28 @@ mirror:
- docker
- notpriv
audit:
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- 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:
- docker
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

18
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartsmtp",
"version": "1.0.4",
"version": "1.0.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -2482,9 +2482,9 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
},
"@types/node": {
"version": "10.17.28",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.17.28.tgz",
"integrity": "sha512-dzjES1Egb4c1a89C7lKwQh8pwjYmlOAG9dW1pBgxEk57tMrLnssOfEthz8kdkNaBd7lIqQx7APm5+mZ619IiCQ==",
"version": "14.0.27",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.27.tgz",
"integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==",
"dev": true
},
"@types/nodemailer": {
@ -10555,9 +10555,9 @@
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
},
"tslint": {
"version": "5.20.1",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.1.tgz",
"integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==",
"version": "6.1.3",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-6.1.3.tgz",
"integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@ -10568,10 +10568,10 @@
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"mkdirp": "^0.5.3",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.8.0",
"tslib": "^1.13.0",
"tsutils": "^2.29.0"
},
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartsmtp",
"version": "1.0.4",
"version": "1.0.7",
"private": false,
"description": "a module for handling smtp stuff",
"main": "dist_ts/index.js",
@ -16,8 +16,8 @@
"@gitzone/tstest": "^1.0.15",
"@pushrocks/qenv": "^4.0.10",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.11.7",
"tslint": "^5.11.0",
"@types/node": "^14.0.27",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {

View File

@ -31,13 +31,23 @@ export class Smartsmtp {
toArg: string,
dataArg = {}
) {
const message = {
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);
return response;
}