Sends emails through the Mailgun API, supporting template rendering and error handling for authentication flows.
// Source: https://github.com/logto-io/logto | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
import { assert, conditional, trySafe } from '@silverhand/essentials';
import { got, HTTPError } from 'got';
import type {
GetConnectorConfig,
SendMessageFunction,
CreateConnector,
EmailConnector,
SendMessagePayload,
GetI18nEmailTemplate,
EmailTemplateDetails,
} from '@logto/connector-kit';
import {
ConnectorError,
ConnectorErrorCodes,
ConnectorType,
validateConfig,
TemplateType,
replaceSendMessageHandlebars,
} from '@logto/connector-kit';
import { defaultMet
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key