* refactor: consolidate error handlers to use getServerErrorFromUnknown - Migrate server-only code to use getServerErrorFromUnknown for better error handling - Add JSDoc documentation to both getErrorFromUnknown and getServerErrorFromUnknown - Update webhook handlers, payment services, email service, and booking service - Keep getErrorFromUnknown for client-side and isomorphic code - Improve error message extraction by using err.cause?.stack instead of err.stack - Fix ESLint warnings: replace 'any' with 'unknown' types, fix hasOwnProperty usage Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * Update packages/app-store/paypal/api/webhook.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * refactor --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
JSX email templates
componentsHolds reusable patternstemplatesA template equals a type of email sent
Usage
import renderEmail from "@calcom/emails/renderEmail";
await renderEmail("TeamInviteEmail", {
language: t,
from: "teampro@example.com",
to: "pro@example.com",
teamName: "Team Pro",
joinLink: "https://cal.com",
});
The first argument is the template name as defined inside templates/index.ts. The second argument are the template props.
Development
You can use an API endpoint to preview the email HTML, there's already one on /apps/web/pages/api/email.ts feel free to change the template to the one you're currently working on.