Encapsulates email sending in Studio.
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.
You can install via npm.
npm install @tableland/studio-mail
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
);
See the web
package for the store is used in the context of Studio.
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.
MIT AND Apache-2.0, © 2021-2024 Tableland Network Contributors