The email task containing type, recipient, and data
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"
}
});
Send an email using the Resend API