email-providers/plunk.ts (providers/plunk.ts)

ShipFree · src/lib/messaging/email/providers/plunk.ts · typescript · MIT
email, tag:provider, tag:open-source

Provides a Plunk email provider wrapper for sending emails via the Plunk API, handling configuration and fallback.

// Source: https://github.com/revokslab/ShipFree | License: MIT | Copyright 2026 Revoks
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Plunk Email Provider
 *
 * Open-source email platform for developers.
 * https://useplunk.com
 *
 * To use this provider:
 * 1. Install: bun add @plunk/node
 * 2. Set environment variables:
 *    - PLUNK_API_KEY: Your Plunk API key
 * 3. Set EMAIL_PROVIDER=plunk in your .env
 *
 * To remove this provider if not needed:
 * 1. Delete this file
 * 2. Remove @plunk/node from package.json
 * 3. Remove PLUNK_* from your .env
 */

import Plunk from '@plunk/node'

import { env } from '@/config/env'
import type { EmailProvider, ProcessedEmailData, SendEmailResult } from '../types'
import { hasNonEmpty } from '../utils'

let client: Plunk | n

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key