New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kassellabs/mail-server-api

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kassellabs/mail-server-api

Kassel Labs mailing api client

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Kassel Labs Mail Server API

This is a client made to make Kassel Labs mailing system easier

How to Use

First you need to initialize your client with your credentials

const MailServerApi = require('@kassellabs/mail-server-api');

const mailApi = MailServerApi({
  url: '<the url from your broker goes here>',
});

Then you're ready to send e-mails

Sending Common HTML or Text e-mails

To send e-mails, you can use the basic mailing API

mailApi.sendEmail({
  from: 'foo@kassellabs.io', // Must be @kassellabs.io
  to: 'foo@gmail.com' // can also be an array of strings,
  replyTo: 'no-reply@kassellabs.io', // optional, defaults to "support@kassellabs.io"
  subject: 'Just wanna say Hi', // optional

  html: '<div>Hi</div>',
  // or
  text: 'Hi',
});

Sending Template E-mails

Sending template e-mails will enable you to send templates e-mails that are already included on the mail-server, check its code to see them.

mailApi.sendTemplateEmail({
  template: 'video-is-ready' // Must be one of the available templates within mail-server
  to: 'foo@gmail.com', // can also be an array of strings
  replyTo: 'no-reply@kassellabs.io', // optional, defaults to "support@kassellabs.io"

  // This data is related to the template you'll send, you'll have to check
  // which variables your template accepts to know what you can send on its
  // context
  context: {
    name: 'John Doe',
    code: 'JHND',
    ...
  },
});

Keywords

FAQs

Package last updated on 25 Jun 2021

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc