Email (SendGrid)
Open Sky Commerce uses SendGrid for transactional email, with templates built in React Email. Three templates are included out of the box.
Setup
- Create a free SendGrid account at sendgrid.com.
- Verify a sender domain or single sender address.
- Generate an API key with Mail Send permissions.
- Add the following to your
.envfile:SENDGRID_API_KEY=SG.xxxxxxxx [email protected]
Included Email Templates
Order Confirmation
Sent to the customer immediately after a successful checkout. Includes order number, line items, totals, and shipping address.
Template file: src/emails/OrderConfirmationEmail.tsx
Password Reset
Triggered when a customer submits the forgot-password form. Contains a time-limited reset link (token expires per your configuration).
Template file: src/emails/PasswordResetEmail.tsx
Welcome Email
Sent when a new customer creates an account via the sign-up page.
Template file: src/emails/WelcomeEmail.tsx
Customizing Templates
Templates are standard React components. Edit the JSX in src/emails/ to change content, layout, or styling. React Email converts the components to compatible HTML automatically.
Testing Emails Locally
Use the React Email preview server to see templates in your browser without sending real emails:
npx email dev