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>
  )
);

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"
}

Trying to send the template from another source

Any idea of how we can make that work ?
image.png
image.png
Convex
Send reliable transactional emails to your users with Resend.
Resend
Was this page helpful?