Skip to content

Commit

Permalink
🐛 [Fix] 인증코드 메일 제목 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjin3395 committed Oct 14, 2024
1 parent c7072fd commit 34883ea
Showing 1 changed file with 147 additions and 144 deletions.
291 changes: 147 additions & 144 deletions src/main/java/com/gamegoo/service/member/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public Member joinMember(String email, String password, String gameName, String
.profileImage(randomProfileImage)
.blind(false)
.mike(false)
.mainPosition(0)
.subPosition(0)
.wantPosition(0)
.mainPosition(0)
.subPosition(0)
.wantPosition(0)
.mannerLevel(1)
.isAgree(isAgree)
.build();
Expand Down Expand Up @@ -128,17 +128,18 @@ public Member joinMember(String email, String password, String gameName, String

// 회원가입 완료된 사용자 정보 로그로 출력
log.info("회원가입 완료 - 이메일: {}, 프로필 이미지: {}, 소환사명: {}, 태그: {}, 티어: {}, 랭크: {}",
member.getEmail(), member.getProfileImage(), member.getGameName(), member.getTag(), member.getTier(), member.getRank());

member.getEmail(), member.getProfileImage(), member.getGameName(), member.getTag(),
member.getTier(), member.getRank());

return member;
}

/**
* 회원가입용 이메일 중복 확인 검증
*
* @param email
*/
public void verifyEmailforNewUser(String email){
public void verifyEmailforNewUser(String email) {
// 해당 이메일이 DB에 있는지 확인하기
boolean isPresent = memberRepository.findByEmail(email).isPresent();

Expand All @@ -151,9 +152,10 @@ public void verifyEmailforNewUser(String email){

/**
* 비밀번호 찾기용 이메일 중복 확인 검증
*
* @param email
*/
public void verifyEmailforExistUser(String email){
public void verifyEmailforExistUser(String email) {
// 해당 이메일이 DB에 있는지 확인하기
boolean isPresent = memberRepository.findByEmail(email).isPresent();

Expand Down Expand Up @@ -210,7 +212,7 @@ public MemberResponse.RefreshTokenResponseDTO verifyRefreshToken(String refresh_
member.updateRefreshToken(new_refresh_token);
memberRepository.save(member);

return new MemberResponse.RefreshTokenResponseDTO(id,access_token, new_refresh_token);
return new MemberResponse.RefreshTokenResponseDTO(id, access_token, new_refresh_token);
}

/**
Expand Down Expand Up @@ -262,7 +264,7 @@ private void sendEmailInternal(String email, String certificationNumber) {
String htmlContent = getCertificationMessage(certificationNumber);

mimeMessageHelper.setTo(email);
mimeMessageHelper.setSubject("GamgGoo 이메일 인증 코드");
mimeMessageHelper.setSubject("GameGoo 이메일 인증 코드");
mimeMessageHelper.setText(htmlContent, true);
log.debug("Prepared email message for email: {}", email);

Expand All @@ -286,141 +288,142 @@ private void sendEmailInternal(String email, String certificationNumber) {
*/
private String getCertificationMessage(String certificationNumber) {
String certificationMessage = ""
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
" <head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
" <title>Gamegoo 이메일 인증</title>\n" +
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" +
" </head>\n" +
" <body>\n" +
" <table\n" +
" style=\"\n" +
" width: 628px;\n" +
" box-sizing: border-box;\n" +
" border-collapse: collapse;\n" +
" background-color: #ffffff;\n" +
" border: 1px solid #c0c0c0;\n" +
" text-align: left;\n" +
" margin: 0 auto;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"width: 628px; height: 521px; padding: 53px 62px 42px 62px\"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td style=\"padding-bottom: 11.61px\">\n" +
" <img\n" +
" src=\"https://ifh.cc/g/BY3XG2.png\"\n" +
" style=\"display: block\"\n" +
" width=\"137\"\n" +
" height=\"24\"\n" +
" alt=\"Gamegoo\"\n" +
" />\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 20px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 25px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 인증코드를 확인해주세요\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 38px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #5a42ee;\n" +
" color: #2d2d2d;\n" +
" font-size: 32px;\n" +
" font-style: normal;\n" +
" font-weight: 700;\n" +
" line-height: 150%;\n" +
" margin-bottom: 30px;\n" +
" \"\n" +
" >\n" +
certificationNumber+
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 30px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 18px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 이메일 인증 절차에 따라 이메일 인증코드를 발급해드립니다.\n" +
" 인증코드는 이메일 발송시점으로부터 3분 동안 유효합니다.<br /><br />\n" +
" 만약 본인 요청에 의한 이메일 인증이 아니라면,<br />\n" +
" [email protected]으로 관련 내용을 전달해 주세요.<br /><br />\n" +
"\n" +
" 감사합니다.\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"\n" +
" width: 628px;\n" +
" height: 292px;\n" +
" padding: 37px 0px 153px 62px;\n" +
" background: #f7f7f9;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <span\n" +
" style=\"\n" +
" color: #606060;\n" +
" font-family: Pretendard;\n" +
" font-size: 11px;\n" +
" font-style: normal;\n" +
" font-weight: 500;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 본 메일은 발신 전용으로 회신되지 않습니다.<br />\n" +
" 궁금하신 점은 겜구 이메일이나 카카오 채널을 통해\n" +
" 문의하시기 바랍니다.<br /><br />\n" +
" email: [email protected]<br />\n" +
" kakao: https://pf.kakao.com/_Rrxiqn<br />\n" +
" copyright 2024. GameGoo All Rights Reserved.<br />\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </body>\n" +
"</html>\n";
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
" <head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
" <title>Gamegoo 이메일 인증</title>\n" +
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" +
" </head>\n" +
" <body>\n" +
" <table\n" +
" style=\"\n" +
" width: 628px;\n" +
" box-sizing: border-box;\n" +
" border-collapse: collapse;\n" +
" background-color: #ffffff;\n" +
" border: 1px solid #c0c0c0;\n" +
" text-align: left;\n" +
" margin: 0 auto;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"width: 628px; height: 521px; padding: 53px 62px 42px 62px\"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td style=\"padding-bottom: 11.61px\">\n" +
" <img\n" +
" src=\"https://ifh.cc/g/BY3XG2.png\"\n" +
" style=\"display: block\"\n" +
" width=\"137\"\n" +
" height=\"24\"\n" +
" alt=\"Gamegoo\"\n" +
" />\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 20px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 25px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 인증코드를 확인해주세요\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 38px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #5a42ee;\n" +
" color: #2d2d2d;\n" +
" font-size: 32px;\n" +
" font-style: normal;\n" +
" font-weight: 700;\n" +
" line-height: 150%;\n" +
" margin-bottom: 30px;\n" +
" \"\n" +
" >\n" +
certificationNumber +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td style=\"padding-top: 30px\">\n" +
" <span\n" +
" style=\"\n" +
" color: #2d2d2d;\n" +
" font-family: Pretendard;\n" +
" font-size: 18px;\n" +
" font-style: normal;\n" +
" font-weight: 400;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 이메일 인증 절차에 따라 이메일 인증코드를 발급해드립니다.\n" +
" 인증코드는 이메일 발송시점으로부터 3분 동안 유효합니다.<br /><br />\n" +
" 만약 본인 요청에 의한 이메일 인증이 아니라면,<br />\n" +
" [email protected]으로 관련 내용을 전달해 주세요.<br /><br />\n" +
"\n" +
" 감사합니다.\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" <table\n" +
" cellpadding=\"0\"\n" +
" cellspacing=\"0\"\n" +
" style=\"\n" +
" width: 628px;\n" +
" height: 292px;\n" +
" padding: 37px 0px 153px 62px;\n" +
" background: #f7f7f9;\n" +
" \"\n" +
" >\n" +
" <tbody>\n" +
" <tr>\n" +
" <td>\n" +
" <span\n" +
" style=\"\n" +
" color: #606060;\n" +
" font-family: Pretendard;\n" +
" font-size: 11px;\n" +
" font-style: normal;\n" +
" font-weight: 500;\n" +
" line-height: 150%;\n" +
" \"\n" +
" >\n" +
" 본 메일은 발신 전용으로 회신되지 않습니다.<br />\n" +
" 궁금하신 점은 겜구 이메일이나 카카오 채널을 통해\n" +
" 문의하시기 바랍니다.<br /><br />\n" +
" email: [email protected]<br />\n" +
" kakao: https://pf.kakao.com/_Rrxiqn<br />\n" +
" copyright 2024. GameGoo All Rights Reserved.<br />\n" +
" </span>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
" </body>\n" +
"</html>\n";

return certificationMessage;
}
Expand Down

0 comments on commit 34883ea

Please sign in to comment.