webiny-mailer-smtp
하는 일
Webiny 프로젝트를 SMTP 이메일 서버에 연결해 이메일을 보낼 수 있게 하는 방법을 보여 줍니다. 이메일 발송을 설정하거나 도착하지 않는 이메일을 고치려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Webiny 프로젝트에 SMTP 이메일 전송을 설정하고 싶을 때.
- ✓Webiny 프로젝트에서 보낸 이메일이 나가지 않을 때.
- ✓Webiny 이메일의 발신 주소나 회신 주소를 바꿔야 하는 경우.
스킬 링크
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/mailer-smtp/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Webiny 프로젝트가 이메일을 보낼 수 있도록 SMTP를 어떻게 설정하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 서버, 포트, 로그인, 발신자 정보가 담긴 코드 예제를 보여 줍니다. 비밀번호를 환경 변수에 두라고 강조하며, API를 바꾼 뒤에는 다시 배포하라고 알려 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Mailer SMTP Configuration
TL;DR
Add <Api.Mailer.Smtp ... /> to your webiny.config.tsx to configure SMTP email delivery at build time. The component serializes the settings into the build artifact — always pass the password via an environment variable, never hard-code it. Deploy the API after making changes.
Core Pattern
import { Api } from "webiny/extensions";
<Api.Mailer.Smtp
host={"smtp.example.com"}
port={587}
user={"smtp-user"}
password={process.env.SMTP_PASSWORD!}
from={"noreply@example.com"}
replyTo={"support@example.com"} {/* optional */}
/>
Place this inside the JSX returned by your config component in webiny.config.tsx, alongside other <Api.*> extensions.
Props Reference
| Prop | Type | Required | Description |
|---|---|---|---|
host |
string |
Yes | SMTP server hostname |
port |
number |
Yes | SMTP server port (positive integer) |
user |
string |
Yes | SMTP authentication username |
password |
string |
Yes | SMTP authentication password — use env var |
from |
string |
Yes | Default sender address |
replyTo |
string |
No | Default reply-to address |
from and replyTo are validated by the email-addresses package against RFC 5322.
Full Example (webiny.config.tsx)
import React from "react";
import { Api, Admin, Core } from "webiny/extensions";
const MyConfig = () => {
return (
<>
{/* ... other extensions ... */}
{/* Mailer: configure SMTP transport via code */}
<Api.Mailer.Smtp
host={"smtp.sendgrid.net"}
port={587}
user={"apikey"}
password={process.env.SENDGRID_API_KEY!}
from={"noreply@acme.com"}
replyTo={"support@acme.com"}
/>
</>
);
};
Add SENDGRID_API_KEY=your-secret to your .env file (never commit it).
Common Mistakes
| Mistake | Fix |
|---|---|
| Hard-coding the password | Use process.env.SMTP_PASSWORD! |
process.env.SMTP_PASSWORD undefined at build time → "expected string, received object" error |
Ensure the env var is set before deploying |
from/replyTo value fails validation |
Must be a valid RFC 5322 mailbox address |
| Settings not taking effect | Run yarn webiny build api after editing webiny.config.tsx |
Quick Reference
# After editing webiny.config.tsx, build the API
yarn webiny build api
Note: This command only works in a
devenvironment. For other environments, runyarn webiny build api --env=YOUR_ENVinstead.
// Environment variable in .env
SMTP_PASSWORD = your - smtp - password - here;
Related Skills
webiny-project-structure— Wherewebiny.config.tsxlives and how extensions are structuredwebiny-local-development— Running and deploying locally
자주 묻는 질문
SMTP 설정은 어디에 넣나요?
webiny.config.tsx 파일에서 다른 API 설정을 반환하는 코드 안에 넣습니다.
비밀번호를 코드에 직접 쓰면 안 되는 이유는 무엇인가요?
설정은 빌드에 저장되므로 직접 쓴 비밀번호도 그곳에 저장된다고 스킬이 경고합니다. 환경 변수를 쓰면 비밀번호를 코드 밖에 둘 수 있습니다.
필수 설정은 무엇인가요?
호스트, 포트, 사용자, 비밀번호, 발신 주소는 필수이며, 회신 주소는 선택 사항입니다.
상세 정보
작성자의 원본 설명
Use when configuring SMTP email/mailer settings in a Webiny project. Triggers on: "configure email", "set up SMTP", "mailer config", "sending emails", "email not working", "configure mailer", "SMTP password", "Api.Mailer.Smtp".
repo: webiny/webiny-js
인기도
- GitHub 스타
- 8.1k
- 순위
- #12615
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
prd-to-plan
8.1k에이전트가 제품 요구사항 문서를 작고 끝까지 이어지는 조각들로 된 단계별 계획으로 바꿔 Markdown 파일로 저장하도록 돕습니다.
webiny-admin-architect
8.1k에이전트에게 Webiny 플랫폼의 관리자 화면을 비즈니스 로직 계층과 프레젠터 패턴으로 만드는 방법을 가르칩니다.
webiny-admin-permissions
8.1k에이전트에게 Webiny 관리자 화면에 권한 제어를 추가하는 법을 가르칩니다. 스키마에서 권한 양식을 자동 생성하고 표시 여부를 확인합니다.
webiny-form-model
8.1k에이전트에게 선언형 필드 빌더, 레이아웃, 검증, 조건부 규칙으로 Webiny 양식을 만드는 법을 가르칩니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.