From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Purchase receipt email template

Purchase receipt email template

All right, so now we want to create our template. We have the React component where we're going to create it. We just need to add a bunch of our predefined components from React email. Now there's quite a few of them, so I'm going to just paste in the import. And you guys can copy it, or you can grab it from the final code or the docs. And they're pretty self-explanatory. So we have the HTML component, which is like the HTML tag and any attributes that it needs. We have the head and body. We have columns, containers, image preview, which will show a preview before you click on the email. Tailwind, so this will wrap around everything, and then we can use Tailwind classes within it. And what we want to show is things like the purchase date. We want to show the order ID, the price, and then we want to list out all the items as well. So let's start off by, see, we already passed in order. And then we're going to wrap everything in the HTML component. Let's close that up. And then first…

Contents