Community생산성 & 협업github.com

cloudflare/cloudflare-email-service

Cloudflare 이메일 서비스(이메일 전송 + 이메일 라우팅)를 통해 트랜잭션 이메일을 보내고 받습니다.

cloudflare-email-service란 무엇인가요?

이 스킬은 Cloudflare Email Service를 사용하여 트랜잭션 이메일을 안정적으로 전송하고 수신하는 방법을 제공합니다. Cloudflare Workers 바인딩 또는 REST API를 통한 이메일 전송, 이메일 라우팅, Agents SDK를 통한 이메일 처리, 그리고 Workers, Node.js, Python, Go 등 다양한 플랫폼에서 이메일 통합을 지원합니다. 또한 SPF/DKIM/DMARC와 같은 이메일 전달성 설정, wrangler를 통한 이메일 설정, MCP 이메일 도구 사용, 코딩 에이전트가 이메일을 보내야 할 때 유용한 구성 세부 정보를 제공합니다. 심지어 '내 Worker에 이메일 추가'와 같은 간단한 요청에도 필요한 모든 중요 설정 정보를 포함하고 있어 개발자와 AI 에이전트가 쉽게 이메일 기능을 통합할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cloudflare/skills/tree/main/skills/cloudflare-email-service

Installed? Explore more 생산성 & 협업 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

cloudflare-email-service은(는) 무엇을 하나요?

Cloudflare 이메일 서비스(이메일 전송 + 이메일 라우팅)를 통해 트랜잭션 이메일을 보내고 받습니다. 이메일 전송(Workers 바인딩 또는 REST API), 이메일 라우팅, Agents SDK 이메일 처리, 또는 모든 앱(Workers, Node.js, Python, Go 등)에 이메일을 통합할 때 사용하세요. 또한 이메일 전달성, SPF/DKIM/DMARC, wrangler 이메일 설정, MCP 이메일 도구, 또는 코딩 에이전트가 이메일을 보내야 할 때 사용하세요. '내 Worker에 이메일 추가'와 같은 간단한 요청에도 중요 구성 세부 정보가 포함되어 있습니다.

주요 기능

  • Cloudflare Email Sending: Workers 바인딩 또는 REST API를 통해 이메일 전송
    • Workers 바인딩: sendEmail() 함수 사용
    • REST API: POST https://api.cloudflare.com/client/v4/accounts/{account_id}/email/send
  • Cloudflare Email Routing: 수신 이메일 처리 및 Workers를 통한 커스텀 처리
    • Catch-all 주소 설정
    • 이메일 라우팅 규칙 구성
  • 이메일 인증 설정:
    • SPF 레코드
    • DKIM 서명
    • DMARC 정책
  • wrangler CLI 지원: wrangler email 명령어로 로컬 개발 및 배포
  • Agents SDK 통합: MCP 도구를 통한 에이전트 이메일 처리 지원

사용 방법

1. Cloudflare Workers 바인딩을 통한 이메일 전송

export default {
  async email(message, env, ctx) {
    // 이메일 수신 처리
    console.log(`이메일 수신: ${message.from}`);
  }
}
import { sendEmail } from 'cloudflare:email';

export default {
  async fetch(request, env, ctx) {
    const msg = new EmailMessage({
      from: '[email protected]',
      to: '[email protected]',
      subject: '테스트 이메일',
      text: '이것은 테스트 이메일입니다.'
    });
    
    await sendEmail(msg);
    return new Response('이메일 전송 완료', { status: 200 });
  }
}

2. REST API를 통한 이메일 전송

curl -X POST https://api.cloudflare.com/client/v4/accounts/{account_id}/email/send \
  -H "Authorization: Bearer {api_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {
      "email": "[email protected]",
      "name": "발신자 이름"
    },
    "to": [
      {
        "email": "[email protected]",
        "name": "수신자 이름"
      }
    ],
    "subject": "테스트 이메일",
    "text": "이것은 테스트 이메일입니다."
  }'

3. wrangler 설정

wrangler.toml에 이메일 바인딩 추가:

[[email]]
name = "EMAIL"
send = ["[email protected]"]
receive = ["*@example.com"]

4. 이메일 라우팅 설정

Cloudflare 대시보드에서 이메일 라우팅 설정:

  1. Cloudflare 대시보드 → 이메일 → 라우팅
  2. Catch-all 주소를 Workers에 연결
  3. 필요한 경우 커스텀 라우팅 규칙 추가

이메일 전달성 설정

SPF 레코드

TXT @ "v=spf1 include:_spf.mx.cloudflare.com ~all"

DKIM 설정

Cloudflare 대시보드 → 이메일 → DKIM → 서명 키 생성

DMARC 정책

TXT _dmarc "v=DMARC1; p=none; rua=mailto:[email protected]"

지원 환경

  • Cloudflare Workers
  • Node.js
  • Python
  • Go
  • 기타 HTTP 클라이언트 지원 언어

참고 사항

  • Cloudflare Free 요금제에서는 일일 2,000개의 이메일 전송 가능
  • Workers 바인딩이 REST API보다 빠른 처리 지원
  • 이메일 라우팅은 수신 이메일만 처리 (전송 불가)
  • SPF/DKIM/DMARC 설정은 도메인 소유자만 구성 가능

자세한 내용은 Cloudflare 이메일 문서를 참조하세요.

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

cloudflare/agents-sdk

Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/building-ai-agent-on-cloudflare

Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities. Generates production-ready agent code deployed to Workers. Use when: user wants to "build an agent", "AI agent", "chat agent", "stateful agent", mentions "Agents SDK", needs "real-time AI", "WebSocket AI", or asks about agent "state management", "scheduled tasks", or "tool calling". Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/building-mcp-server-on-cloudflare

Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment. Generates server code, configures auth providers, and deploys to Workers. Use when: user wants to "build MCP server", "create MCP tools", "remote MCP", "deploy MCP", add "OAuth to MCP", or mentions Model Context Protocol on Cloudflare. Also triggers on "MCP authentication" or "MCP deployment". Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/cloudflare

Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/cloudflare-one

Design, configure, troubleshoot, or review Cloudflare One Zero Trust and SASE deployments. Use cloudflare-one-migrations for migration planning from other vendors.

cloudflare/durable-objects

Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/sandbox-migrate-to-next

Migrate Cloudflare Sandbox apps from stable @cloudflare/sandbox to @cloudflare/sandbox@next (SDK 1.0 preview). Use sandbox-next for apps already on the preview.

cloudflare/sandbox-next

Build or maintain Cloudflare Sandbox apps on @cloudflare/sandbox@next (SDK 1.0 preview). Use sandbox-migrate-to-next when porting a stable app.

cloudflare/sandbox-sdk

Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/sandbox-stable

Build or maintain Cloudflare Sandbox apps on the stable @cloudflare/sandbox package. Use sandbox-next for preview apps and sandbox-migrate-to-next for stable-to-preview migrations.

cloudflare/skills

Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext, or setting up vinext for Workers. For setup, migration, or deployment, install vinext's upstream skills with `npx skills add cloudflare/vinext` if missing, then read and follow the applicable skill and docs.

cloudflare/turnstile-spin

Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.

cloudflare/web-perf

Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.

cloudflare/workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

cloudflare/wrangler

Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

관련 스킬