cal/packages/emails
alannnc 96af17d8d7
feat: OOO booking-forwarding (#12653)
* feat-profile-forwarding

* fix for promises of handling

* fix badge success color

* clean up

* fix suggested changes

* Changed design on booking-forward pages and moar test

* taking care of suggested changes, trpc errors and code cleaning

* improve text

* fix conflicting data-testid

* fix unique data-testid

* fix error css-global, email button styles, error conditional

* rename files to match functionality, remove away ui

* Add translations and migration

* remove log

* small fixes + improvements

* fix styles to match new design

* merge fixes

* Fix styles dark mode

* Solving merge conflicts from earlier

* Fix/change test to match new elements

* use trash icon button insted of dots (design issues)

* only send email if toUserId is set

* Fix date picker dark mode

* merge with remote

* removed status field from table and email its now for notify

* small text improvement in email

* check for team plan not paid plan

* fixes and clean up due to removing status

* fix old send request name to new behaviour

* more naming improvements and text

* remove status from handle-type

* code clean up

* fix type error

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2024-01-10 17:04:02 +00:00
..
lib feat: Add consistent iCalUID (#12122) 2023-12-15 10:28:32 -05:00
src feat: OOO booking-forwarding (#12653) 2024-01-10 17:04:02 +00:00
templates feat: OOO booking-forwarding (#12653) 2024-01-10 17:04:02 +00:00
docker-compose.yml chore: prettier 2023-08-15 11:59:16 -07:00
email-manager.ts feat: OOO booking-forwarding (#12653) 2024-01-10 17:04:02 +00:00
index.ts Refactor emails to use JSX as templating engine (#2915) 2022-06-06 17:49:56 +00:00
package.json chore: Sync packages mismatches (#9725) 2023-06-22 15:25:37 -07:00
README.md chore: [app-router-migration-2] migrate trpc, ssgInit, ssrInit (#12593) 2023-12-07 13:43:41 -07:00
tailwind.config.js Refactor emails to use JSX as templating engine (#2915) 2022-06-06 17:49:56 +00:00
tsconfig.json Update all Yarn dependencies (2022-08-17) (#3887) 2022-08-29 17:55:27 -06:00

JSX email templates

  • components Holds reusable patterns
  • templates A template equals a type of email sent

Usage

import { renderEmail } from "@calcom/emails";

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.