Socket
Book a DemoInstallSign in
Socket

@trycake/ms-email-service

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@trycake/ms-email-service

Email service implemented to notify MS actions

3.0.1
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

Micro services email API

How to deploy?

Clone the project
Install dependencies
npm install
Check eslint
npm run eslint
Run test cases
npm run test
Build the project
npm run build
Copy 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 publish

How to use?

Add as a dependency in package.json
"@trycake/ms-email-service": "<version>"
Install dependencies
npm install
Import to utilize the functionalities
import { EmailService } from '@trycake/ms-email-service';
Email service will expose configure() and sendMail() to use in MSs
Configure 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
  });

FAQs

Package last updated on 01 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.