Skip to content

Commit 4ea7f33

Browse files
committed
[fix] : 이메일 발송 시 인증 메일의 HTML 레이아웃 수정
1 parent f480cf4 commit 4ea7f33

File tree

2 files changed

+71
-4
lines changed

2 files changed

+71
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ out/
4141
*.properties
4242

4343
### 폴더 추가
44-
src/main/generated/
44+
src/main/generated/
45+
46+
.DS_Store

src/main/java/org/dfbf/soundlink/domain/user/service/MailService.java

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,74 @@ public MimeMessage createMail(String mail, String authCode) throws MessagingExce
4040
message.setRecipients(MimeMessage.RecipientType.TO, mail);
4141
message.setSubject("SoundLink 이메일 인증");
4242

43-
String body = "<h3>[사운드링크] 요청하신 인증 번호입니다.</h3>"
44-
+ "<h1>" + authCode + "</h1>"
45-
+ "<h3>감사합니다.</h3>";
43+
String body = "<div style='font-size: 14px; font-family: Gulim,굴림,sans-serif;'>"
44+
+ "<div style='margin: 0 auto; padding: 0; font-family: 맑은고딕, Malgun Gothic, dotum, gulim, sans-serif; letter-spacing: -0.6px; width: 100%;'>"
45+
+ "<table cellpadding='0' cellspacing='0' width='600' style='margin: 0 auto; width: 600px; padding: 0; font-family: 맑은고딕, Malgun Gothic, dotum, gulim, sans-serif; letter-spacing: -0.6px; line-height: 1.5; background-color: #fff;'>"
46+
+ "<tbody>"
47+
+ "<tr>"
48+
+ "<td style='border-bottom: 1px solid #242424; margin: 0; padding: 24px 40px; letter-spacing: -0.6px;'>"
49+
+ "<table cellpadding='0' cellspacing='0' style='margin: 0; padding: 0; width: 100%; line-height: 1.5;'>"
50+
+ "<tbody>"
51+
+ "<tr>"
52+
+ "<td style='padding-bottom: 10px;'>"
53+
+ "<img src='https://github.com/user-attachments/assets/4187f56f-9500-4e90-a76d-6305a8344dc7' width='80' alt='사운드링크' style='margin: 0; padding: 0;' loading='lazy'/>"
54+
+ "</td>"
55+
+ "</tr>"
56+
+ "<tr>"
57+
+ "<td>"
58+
+ "<b style='font-size: 24px; line-height: 1.3; letter-spacing: -0.6px;'>"
59+
+ "사운드링크<br/>"
60+
+ "인증번호 안내"
61+
+ "</b>"
62+
+ "</td>"
63+
+ "</tr>"
64+
+ "</tbody>"
65+
+ "</table>"
66+
+ "</td>"
67+
+ "</tr>"
68+
+ "<tr>"
69+
+ "<td style='margin: 0; padding: 40px; letter-spacing: -0.6px;'>"
70+
+ "<table cellpadding='0' cellspacing='0' style='width: 100%; line-height: 28px;'>"
71+
+ "<tbody>"
72+
+ "<tr>"
73+
+ "<td style='padding-bottom: 12px; color: #555555; font-size: 16px;'>"
74+
+ "안녕하세요.<br/>"
75+
+ "사운드링크입니다.<br/>"
76+
+ "</td>"
77+
+ "</tr>"
78+
+ "<tr>"
79+
+ "<td style='line-height: 1.7; color: #555555; font-size: 16px;'>"
80+
+ "회원님께서 요청하신 이메일 인증 코드를 발송해드립니다.<br/>"
81+
+ "아래 인증번호를 입력하여 이메일 인증을 완료해주세요."
82+
+ "</td>"
83+
+ "</tr>"
84+
+ "</tbody>"
85+
+ "</table>"
86+
+ "</td>"
87+
+ "</tr>"
88+
+ "<tr>"
89+
+ "<td style='margin: 0; padding: 40px; background: #FBEAFF; letter-spacing: -0.6px; text-align: center;'>"
90+
+ "<table cellpadding='0' cellspacing='0' style='width: 100%; line-height: 1.5; background: #FBEAFF;'>"
91+
+ "<tbody>"
92+
+ "<tr>"
93+
+ "<td align='center' style='color: #555; padding-bottom: 16px;'>"
94+
+ "<h3 style='font-weight: bold; font-size: 16px; line-height: 28px; color: #242424; margin: 0; padding-bottom: 12px;'>"
95+
+ "인증번호"
96+
+ "</h3>"
97+
+ "<div style='font-weight: bold; font-size: 32px; text-align: center; color: #242424; padding: 20px; background: #FFFFFF; border-radius: 16px; display: inline-block;'>"
98+
+ authCode
99+
+ "</div>"
100+
+ "</td>"
101+
+ "</tr>"
102+
+ "</tbody>"
103+
+ "</table>"
104+
+ "</td>"
105+
+ "</tr>"
106+
+ "</tbody>"
107+
+ "</table>"
108+
+ "</div>"
109+
+ "</div>";
110+
46111
message.setText(body, "UTF-8", "html");
47112

48113
return message;

0 commit comments

Comments
 (0)