cloudSpendAlert/sendCloudSpendAlertEmail.ts

langfuse · packages/shared/src/server/services/email/cloudSpendAlert/sendCloudSpendAlertEmail.ts · typescript · MIT
email, tag:knn-classified

Module exposing: sendCloudSpendAlertEmail

// Source: https://github.com/langfuse/langfuse | License: MIT | Copyright 2023-2026 ClickHouse, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { render } from "@react-email/render";
import { createMailTransport } from "../transport";
import { CloudSpendAlertEmailTemplate } from "./CloudSpendAlertEmailTemplate";
import { logger } from "../../../logger";

export interface CloudSpendAlertEmailProps {
  env: Partial<
    Record<
      "EMAIL_FROM_ADDRESS" | "SMTP_CONNECTION_URL" | "NEXTAUTH_URL",
      string | undefined
    >
  >;
  orgId: string;
  orgName: string;
  alertTitle: string;
  currentSpend: number;
  threshold: number;
  detectedAtUtc?: string;
  recipients: string[];
}

export const sendCloudSpendAlertEmail = async ({
  env,
  orgId,
  orgName,
  al

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

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

Get a free API key