fix(core): update

This commit is contained in:
Philipp Kunz 2020-08-12 15:09:41 +00:00
parent a9ed0370fd
commit 290b09623f
4 changed files with 16 additions and 19 deletions

View File

@ -9,8 +9,7 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild)",
"format": "(gitzone format)"
"build": "(tsbuild --web)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
@ -41,4 +40,4 @@
"npmextra.json",
"readme.md"
]
}
}

View File

@ -17,13 +17,15 @@ tap.test('should create a valid instance of Smartsmtp', async () => {
expect(testSmartsmtp).to.be.instanceOf(smartsmtp.Smartsmtp);
});
tap.test('should send a message', async () => {
const result = await testSmartsmtp.sendSmartMail(new smartmail.Smartmail({
body: '',
from: 'smartsmtp@mail.lossless.one',
subject: 'this is a test message',
}), 'sandbox@mail.git.zone');
const result = await testSmartsmtp.sendSmartMail(
new smartmail.Smartmail({
body: '',
from: 'smartsmtp@mail.lossless.one',
subject: 'this is a test message',
}),
'sandbox@mail.git.zone'
);
console.log(result);
});

View File

@ -18,8 +18,8 @@ export class Smartsmtp {
secure: true, // upgrade later with STARTTLS
auth: {
user: optionsArg.smtpUser,
pass: optionsArg.smtpPassword
}
pass: optionsArg.smtpPassword,
},
});
}
@ -36,9 +36,9 @@ export class Smartsmtp {
to: toArg,
subject: smartmailArg.getSubject(dataArg),
text: smartmailArg.getBody(dataArg),
html: smartmailArg.getBody(dataArg)
html: smartmailArg.getBody(dataArg),
};
const response = await this.nodemailerTransport.sendMail(message);
return response;
}
}
}

View File

@ -1,13 +1,9 @@
// @pushrocks scope
import * as smartmail from '@pushrocks/smartmail';
export {
smartmail
};
export { smartmail };
// third party scope
import * as nodemailer from 'nodemailer';
export {
nodemailer
};
export { nodemailer };