0.0.0-pre.0 • Published 19 days ago

@tableland/studio-mail v0.0.0-pre.0

Weekly downloads
-
License
MIT AND Apache-2....
Repository
github
Last release
19 days ago

@tableland/studio-mail

License: MIT AND Apache-2.0 Version standard-readme compliant

Encapsulates email sending in Studio.

Background

This package only exports a single function initMailApi, which takes an optional apiKey for Postmark. If the API key is not provided, emails will be logged to the console. If an API key is provided, emails will actually be sent.

Install

You can install via npm.

npm install @tableland/studio-mail

Usage

import { initMailApi } from "@tableland/studio-mail";

const mailApiKey = "your_postmark_api_key"; // Or, initialize without a key to log to console
const mailApi = initMailApi(mailApiKey);

await mailApi.sendInvite(
  "email@example.com", // User's email
  "https://example.com/image", // Link to invite image
  "inviter-username", // Username of who is inviting
  "team-name", // Team name string
  "https://example.com/accept", // Link to accept invite
);

Development

See the web package for the store is used in the context of Studio.

Contributing

PRs accepted. Studio is still under initial development, so if you are interested in helping out, feel free to connect on Discord: https://tableland.xyz/discord

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT AND Apache-2.0, © 2021-2024 Tableland Network Contributors