Skip to content

Conversation

@hodoon
Copy link
Collaborator

@hodoon hodoon commented Feb 18, 2025

[feat] 메일 발송 기능 구현

#38

변경 내용

  • SMTP설정
  • env에 GMail 아이디 및 비밀번호 추가
  • EmailService 구현
  • ApplicantServiceImpl에 이메일 전송 메소드(sentEmailsToApplicants) 추가
  • AdminController에 이메일 전송 API추가

구현 사항

  • 기본적으로 있는 HTML템플릿을 지원자 전원에게 전송

}

@Operation(summary = "지원자 메일 전송")
@Operation(summary = "서류 결과 메일 전송")
Copy link
Member

@ysw789 ysw789 Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서류, 최종 결과 메일 발송 메소드를 따로 나누지 않고 메일 발송 메소드 식으로 하나로 합쳐 클라이언트 요청에 따라 다르게 처리할 수 있을 것 같네요.
Enum으로 타입을 정의해놓고 클라이언트로부터 요청과 함께 메일 발송 타입을 전달받으면 그에 따라 발송되는 식으로 하는 건 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is good idea!!

// 지원자 이메일 보내기
@Override
public void sendEmailsToApplicants(){
public void sendDocumentPassEmailsToApplicants(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdminController 코멘트와 마찬가지로 메일 발송 메소드를 하나로 정의하고 발송 타입에 따라 다르게 동작되도록 구현하면 좋을 것 같습니다.

case FINAL_RESULT:
applicants = applicantRepository.findByStatusIn(
List.of(ApplicantStatus.INTERVIEW_PASSED,
ApplicantStatus.INTERVIEW_PASSED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최종 결과 안내는 상태가 INTERVIEW_PASSED, INTERVIEW_FAILED 인 지원자에게 발송하도록 수정해주세요

@hodoon hodoon merged commit b0c1f93 into dev Feb 19, 2025
1 check passed
@hodoon hodoon deleted the feat/#38-1 branch February 19, 2025 05:45
@ysw789 ysw789 linked an issue Feb 20, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 메일 발송 기능 구현

3 participants