3.0.1 • Published 3 years ago
@trycake/ms-email-service v3.0.1
Micro services email API
How to deploy?
Clone the project
Install dependencies
npm installCheck eslint
npm run eslintRun test cases
npm run testBuild the project
npm run buildCopy the package.json and README to build
cp package.json README.md build/Deploy the package to leapset repo (make sure update the version)
npm publishHow to use?
Add as a dependency in package.json
"@trycake/ms-email-service": "<version>"Install dependencies
npm installImport to utilize the functionalities
import { EmailService } from '@trycake/ms-email-service';
Email service will expose configure() and sendMail() to use in MSsConfigure email service
Provide email configs as a input to configure()
emailConfigs = {
url: http://xxx-email.leapset.com/api/xml, //Required
from: abc@syscoLabs.com, //Required
toAddreses: [cde@syscoLabs.com], //Required
bccAddreses: [efg@syscoLabs.com], //Optional
}Send email alert
Provide email data as a input to sendMail()
emailData = {
subject: 'Test', //Required
message: 'Message from The Sysco Labs Team.', //Required
attachmentName: 'attachment.pdf', //Optional
attachmentData: '<base64 encoded file data>', //Optional
url: http://xxx-email.leapset.com/api/xml, //Optional
from: abc@syscoLabs.com, //Optional
toAddreses: [cde@syscoLabs.com], //Optional
bccAddreses: [efg@syscoLabs.com], //Optional
}Handle success and errors
Handle success and error accordingly
sendMail(emailData).then((response) => {
// Succeed
}).catch((e) => {
// Error
});3.0.1
3 years ago
3.0.0
3 years ago
3.0.0-alpha.7
3 years ago
3.0.0-alpha.6
3 years ago
3.0.0-alpha.1
3 years ago
3.0.0-alpha.3
3 years ago
3.0.0-alpha.2
3 years ago
3.0.0-alpha.5
3 years ago
3.0.0-alpha.4
3 years ago
2.0.1
8 years ago
2.0.0
8 years ago
1.0.11
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago