Mayson Monorepo Documentation
    Preparing search index...

    Function sendEmail

    • Send an email using the Resend API

      Type Parameters

      Parameters

      • task: SendEmailTask<T>

        The email task containing type, recipient, and data

      Returns Promise<EmailSendResult>

      Result indicating success or failure

      const result = await sendEmail({
      type: "portfolio-change",
      to: "[email protected]",
      data: {
      totalValue: 10000,
      previousValue: 9500,
      changePercent: 5.26,
      changeAmount: 500,
      topGainers: [],
      topLosers: [],
      period: "daily"
      }
      });