Resend

Hi guys, I have a question I want to send emails using convex, better-auth and resend I saw the post related to that https://www.convex.dev/components/resend but I'm getting a lot of issues trying to setup the email with react-email For example on image 1 I'm not able to use JSX so I have to convert the entire file to TSX extension On image 2, I tried to generate the HTML constant from another source. like
export const html = await pretty(
await render(
<Html>
<Button
href="https://example.com"
style={{ background: "#000", color: "#fff", padding: "12px 20px" }}
>
Click me
</Button>
</Html>
)
);
export const html = await pretty(
await render(
<Html>
<Button
href="https://example.com"
style={{ background: "#000", color: "#fff", padding: "12px 20px" }}
>
Click me
</Button>
</Html>
)
);
I was making these tests on the same convex folder because I was getting issues like this:
{
"code": "[Request ID: 775a3fef095f004f] Server Error: Uncaught ReferenceError: MessageChannel is not defined",
"trace": "Uncaught ReferenceError: MessageChannel is not defined\n at <an"
}
{
"code": "[Request ID: 775a3fef095f004f] Server Error: Uncaught ReferenceError: MessageChannel is not defined",
"trace": "Uncaught ReferenceError: MessageChannel is not defined\n at <an"
}
Trying to send the template from another source Any idea of how we can make that work ?
Convex
Resend
Send reliable transactional emails to your users with Resend.
No description
No description
1 Reply
Cristian Sotomayor
nvm I fixed it I had to use the react-email lib methods and finally worked. Looks like the { react: JSX } prop is causing some issues with resend or convex idk

Did you find this page helpful?