diff --git a/src/app/api/qna/notify/route.ts b/src/app/api/qna/notify/route.ts index ae5bdac..866b8cc 100644 --- a/src/app/api/qna/notify/route.ts +++ b/src/app/api/qna/notify/route.ts @@ -8,6 +8,10 @@ async function notify(request: NextRequest): Promise { const formData = await request.formData() const qnaClsLrgCd = formData.get('qnaCd') as string + // 메일 발송 테스트용 파라미터. 테스트 완료 시 제거. + // 여러 수신자에게 발송 시 ', '(콤마)로 구분하여 입력 + const testReceivers = formData.get('testReceivers') as string + /* 파라미터 체크 */ if (qnaClsLrgCd === '') { return NextResponse.json({ error: '필수 파라미터가 누락되었습니다' }, { status: HttpStatusCode.BadRequest }) @@ -22,7 +26,7 @@ async function notify(request: NextRequest): Promise { await sendEmail({ from: 'test@test.com', // to: receivers, // 테스트 완료 시 주석 해제 - to: 'seul@interplug.co.kr', // to: 'test@test.com', + to: testReceivers, subject: '메일 전송 테스트 제목', content: '

메일 전송 테스트입니다.

', })