Skip to content

Commit 6249dac

Browse files
committed
docs: remove react-email references from email service docs
- Delete react-email-templates.mdx example page - Remove React Email Support feature card from index - Remove react field from EmailMessage interface - Remove React Email integration section from Workers API page
1 parent d7a486e commit 6249dac

3 files changed

Lines changed: 0 additions & 215 deletions

File tree

src/content/docs/email-service/api/send-emails/workers-api.mdx

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ interface EmailMessage {
4545
subject: string;
4646
html?: string;
4747
text?: string;
48-
react?: React.ReactElement; // React Email support
4948
cc?: string | string[];
5049
bcc?: string | string[];
5150
replyTo?: string | { email: string; name: string };
@@ -193,95 +192,6 @@ const response = await env.EMAIL.send({
193192
</TabItem>
194193
</Tabs>
195194

196-
### React Email integration
197-
198-
Use React components to build email templates:
199-
200-
<Tabs>
201-
<TabItem label="React component">
202-
203-
```tsx
204-
// email-templates/WelcomeEmail.tsx
205-
import {
206-
Html,
207-
Head,
208-
Body,
209-
Container,
210-
Text,
211-
Button,
212-
} from "@react-email/components";
213-
214-
interface WelcomeEmailProps {
215-
name: string;
216-
verificationUrl: string;
217-
}
218-
219-
export function WelcomeEmail({ name, verificationUrl }: WelcomeEmailProps) {
220-
return (
221-
<Html>
222-
<Head />
223-
<Body
224-
style={{ fontFamily: "Arial, sans-serif", backgroundColor: "#f6f9fc" }}
225-
>
226-
<Container style={{ padding: "20px" }}>
227-
<Text style={{ fontSize: "24px", fontWeight: "bold" }}>
228-
Welcome, {name}!
229-
</Text>
230-
<Text>
231-
Thank you for joining our service. Click the button below to verify
232-
your email address.
233-
</Text>
234-
<Button
235-
href={verificationUrl}
236-
style={{
237-
backgroundColor: "#007ee6",
238-
color: "white",
239-
padding: "12px 20px",
240-
textDecoration: "none",
241-
borderRadius: "4px",
242-
display: "inline-block",
243-
}}
244-
>
245-
Verify Email
246-
</Button>
247-
</Container>
248-
</Body>
249-
</Html>
250-
);
251-
}
252-
```
253-
254-
</TabItem>
255-
<TabItem label="Using in Worker">
256-
257-
```typescript
258-
import { WelcomeEmail } from './email-templates/WelcomeEmail';
259-
260-
export default {
261-
async fetch(request: Request, env: Env): Promise<Response> {
262-
const { email, name } = await request.json();
263-
264-
const verificationToken = generateVerificationToken();
265-
const verificationUrl = `https://yourdomain.com/verify?token=${verificationToken}`;
266-
267-
const response = await env.EMAIL.send({
268-
to: email,
269-
from: "welcome@yourdomain.com",
270-
subject: "Welcome to our service!",
271-
react: <WelcomeEmail name={name} verificationUrl={verificationUrl} />
272-
});
273-
274-
return new Response(JSON.stringify({
275-
success: true,
276-
emailId: response.messageId
277-
}));
278-
}
279-
};
280-
```
281-
282-
</TabItem>
283-
</Tabs>
284-
285195
## sendBatch() method
286196

287197
Send multiple emails in a single request using the `sendBatch()` method:

src/content/docs/email-service/examples/email-sending/react-email-templates.mdx

Lines changed: 0 additions & 118 deletions
This file was deleted.

src/content/docs/email-service/index.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,6 @@ See the full [Workers Email API reference](/email-service/api/send-emails/worker
135135
Route incoming emails to custom addresses, Workers, or external destinations.
136136
</Feature>
137137
138-
<Feature
139-
header="React Email Support"
140-
href="/email-service/examples/email-sending/react-email-templates/"
141-
>
142-
Build modern, responsive email templates using React components.
143-
</Feature>
144-
145138
<Feature header="Deliverability" href="/email-service/concepts/deliverability/">
146139
Automatic IP reputation management and deliverability optimization.
147140
</Feature>

0 commit comments

Comments
 (0)