Repository navigation
feat(consultation): 새 상담 접수를 이메일로 알린다 - #52
Merged
Merged
Conversation
Resend REST API 를 fetch 로 호출한다. 의존성 추가 없음. - RESEND_API_KEY / CONSULTATION_NOTIFY_TO / CONSULTATION_NOTIFY_FROM 셋이 모두 있어야 켜지고, 없으면 접수만 되고 알림은 생략된다 - 메일에는 상담 내용(answers)을 넣지 않는다 — 접수 사실·시각·접수함 링크만. 외부 메일 로그에 사건 내용이 남지 않게 한다 - 발송 실패는 삼킨다. 저장 성공 뒤의 일이라 접수 결과에 영향 없음 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
지금은 변호사가 어드민에 들어가야만 새 상담을 알 수 있다. 접수 즉시 이메일로 알린다. (카카오 알림톡은 채널 개설·템플릿 심사가 선행돼야 해서 이후 태스크)
변경
src/lib/consultation-notify.ts신설: Resend REST API 를 fetch 로 호출. 의존성 추가 없음submitConsultation에서 insert 성공 후 발송. 실패는 함수 안에서 삼켜 접수 결과에 영향 없음.env.example:RESEND_API_KEY/CONSULTATION_NOTIFY_TO/CONSULTATION_NOTIFY_FROM명세. 셋 다 있어야 켜지고 없으면 조용히 생략docs/consultation.md: 9번 섹션으로 정책 기록, '아직 없는 것'에서 메일 알림 제거확인
범위 밖
참고
실제 발송하려면 Vercel 환경변수에 Resend 키와 수신/발신 주소를 넣어야 한다. 발신 도메인은 Resend 에서 인증 필요 (테스트는 onboarding@resend.dev).
🤖 Generated with Claude Code