Backend2026년 1월 18일2분 읽기

Resend — 개발자를 위한 이메일 API

YS
YoungSam
조회 1010

Resend + React Email

import { Resend } from "resend";
import { WelcomeEmail } from "./emails/welcome";

const resend = new Resend(process.env.RESEND_API_KEY);

await resend.emails.send({
  from: "noreply@example.com",
  to: "user@gmail.com",
  subject: "환영합니다!",
  react: WelcomeEmail({ name: "김철수" }),
});

React Email 템플릿

import { Html, Head, Body, Text, Button } from "@react-email/components";

export function WelcomeEmail({ name }) {
  return (
    <Html>
      <Body style={{ fontFamily: "sans-serif" }}>
        <Text>안녕하세요 {name}님</Text>
        <Button href="https://example.com">시작하기</Button>
      </Body>
    </Html>
  );
}
ResendEmailAPI

댓글 0

아직 댓글이 없습니다.