fix(core): update
This commit is contained in:
parent
a9ed0370fd
commit
290b09623f
@ -9,8 +9,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild)",
|
||||
"format": "(gitzone format)"
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
|
@ -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({
|
||||
const result = await testSmartsmtp.sendSmartMail(
|
||||
new smartmail.Smartmail({
|
||||
body: '',
|
||||
from: 'smartsmtp@mail.lossless.one',
|
||||
subject: 'this is a test message',
|
||||
}), 'sandbox@mail.git.zone');
|
||||
}),
|
||||
'sandbox@mail.git.zone'
|
||||
);
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
|
@ -18,8 +18,8 @@ export class Smartsmtp {
|
||||
secure: true, // upgrade later with STARTTLS
|
||||
auth: {
|
||||
user: optionsArg.smtpUser,
|
||||
pass: optionsArg.smtpPassword
|
||||
}
|
||||
pass: optionsArg.smtpPassword,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ 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;
|
||||
|
@ -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 };
|
||||
|
Loading…
x
Reference in New Issue
Block a user