Skip to content

Commit 99fa912

Browse files
committed
feat: 발송 이메일 템플릿 추가
1 parent b834817 commit 99fa912

File tree

5 files changed

+291
-81
lines changed

5 files changed

+291
-81
lines changed

src/main/java/dmu/dasom/api/domain/email/service/EmailService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public void sendEmail(String to, String name, MailType mailType) throws Messagin
3030
String subject;
3131
String templateName = switch (mailType) {
3232
case DOCUMENT_RESULT -> {
33-
subject = "서류 합격 안내";
33+
subject = "동양미래대학교 컴퓨터소프트웨어공학과 전공 동아리 DASOM 서류 결과 안내";
3434
yield "document-pass-template";
3535
}
3636
case FINAL_RESULT -> {
37-
subject = "최종 합격 안내";
37+
subject = "동양미래대학교 컴퓨터소프트웨어공학과 전공 동아리 DASOM 최종 합격 안내";
3838
yield "final-pass-template";
3939
}
4040
default -> throw new IllegalStateException("Unexpected value: " + mailType);
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<!DOCTYPE html>
2+
<html lang="ko">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>이메일 안내</title>
7+
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.css" />
8+
<style>
9+
body {
10+
background-color: #17171B;
11+
color: white;
12+
font-family: 'Pretendard', sans-serif;
13+
display: flex;
14+
justify-content: center;
15+
align-items: center;
16+
height: 100vh;
17+
margin: 0;
18+
}
19+
20+
.email-container {
21+
width: 740px;
22+
height: 680px;
23+
background: #17171B;
24+
padding: 30px;
25+
position: relative;
26+
}
27+
28+
.logo {
29+
display: flex;
30+
justify-content: center;
31+
position: relative;
32+
margin-bottom: 20px;
33+
}
34+
35+
.logo img {
36+
width: 21px;
37+
height: 24px;
38+
border-radius: 3px;
39+
}
40+
41+
.divider {
42+
width: 100%;
43+
display: flex;
44+
justify-content: space-between;
45+
align-items: center;
46+
}
47+
48+
.divider .line {
49+
flex: 1;
50+
border-top: 1px solid #00B493;
51+
margin: 0 10px;
52+
}
53+
54+
.title {
55+
font-size: 48px;
56+
font-weight: 900;
57+
color: #00B493;
58+
margin-bottom: 30px;
59+
}
60+
61+
.greeting {
62+
font-size: 20px;
63+
font-weight: 600;
64+
margin-bottom: 40px;
65+
}
66+
67+
.content {
68+
font-size: 16px;
69+
font-weight: 400;
70+
line-height: 2.5;
71+
text-align: right;
72+
margin-bottom: 40px;
73+
}
74+
75+
.contact {
76+
font-size: 16px;
77+
font-weight: 400;
78+
line-height: 1.5;
79+
}
80+
81+
.button-container {
82+
display: flex;
83+
justify-content: flex-end;
84+
margin-bottom: 40px;
85+
}
86+
87+
.button {
88+
background: #00B493;
89+
color: white;
90+
font-size: 16px;
91+
font-weight: 400;
92+
padding: 10px 20px;
93+
border-radius: 5px;
94+
display: flex;
95+
align-items: center;
96+
text-decoration: none;
97+
}
98+
99+
.button:hover {
100+
background: #00987A;
101+
}
102+
103+
.button .arrow {
104+
border: solid white;
105+
border-width: 0 2px 2px 0;
106+
display: inline-block;
107+
padding: 5px;
108+
transform: rotate(-45deg);
109+
margin-left: 10px;
110+
}
111+
</style>
112+
</head>
113+
<body>
114+
<div class="email-container">
115+
<div class="logo">
116+
<div class="divider">
117+
<div class="line"></div>
118+
<img src="logo.png" alt="로고">
119+
<div class="line"></div>
120+
</div>
121+
</div>
122+
123+
<div class="title">DASOM</div>
124+
<div class="greeting" th:text="${name} + '님 안녕하세요.'"></div>
125+
<div>컴퓨터공학부 전공동아리 다솜입니다.</div>
126+
127+
<div class="content">
128+
먼저 다솜 34기에 많은 관심을 갖고 지원해 주셔서 감사드리며,<br> 내부 서류 평가 결과 및 추후 일정에 관해 안내드리고자 이메일을 발송하게 되었습니다.<br>
129+
모집 폼 합/불합 결과는 아래 버튼 혹은 홈페이지를 통해 확인이 가능합니다.
130+
</div>
131+
132+
<div class="button-container">
133+
<a href="#" class="button">
134+
서류 결과 확인하기 <span class="arrow"></span>
135+
</a>
136+
</div>
137+
138+
<div class="contact">
139+
또한, 문의 사항은 본 메일에 회신 또는 아래 번호로 편하게 연락 부탁드립니다.<br>
140+
010-6361-3481
141+
</div>
142+
</div>
143+
</body>
144+
</html>

src/main/resources/template/email-template.html

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<!DOCTYPE html>
2+
<html lang="ko">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>이메일 안내</title>
7+
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.css" />
8+
<style>
9+
body {
10+
background-color: #17171B;
11+
color: white;
12+
font-family: 'Pretendard', sans-serif;
13+
display: flex;
14+
justify-content: center;
15+
align-items: center;
16+
height: 100vh;
17+
margin: 0;
18+
}
19+
20+
.email-container {
21+
width: 740px;
22+
height: 680px;
23+
background: #17171B;
24+
padding: 30px;
25+
position: relative;
26+
}
27+
28+
.logo {
29+
display: flex;
30+
justify-content: center;
31+
position: relative;
32+
margin-bottom: 20px;
33+
}
34+
35+
.logo img {
36+
width: 21px;
37+
height: 24px;
38+
border-radius: 3px;
39+
}
40+
41+
.divider {
42+
width: 100%;
43+
display: flex;
44+
justify-content: space-between;
45+
align-items: center;
46+
}
47+
48+
.divider .line {
49+
flex: 1;
50+
border-top: 1px solid #00B493;
51+
margin: 0 10px;
52+
}
53+
54+
.title {
55+
font-size: 48px;
56+
font-weight: 900;
57+
color: #00B493;
58+
margin-bottom: 30px;
59+
}
60+
61+
.greeting {
62+
font-size: 20px;
63+
font-weight: 600;
64+
margin-bottom: 40px;
65+
}
66+
67+
.content {
68+
font-size: 16px;
69+
font-weight: 400;
70+
line-height: 2.5;
71+
text-align: right;
72+
margin-bottom: 40px;
73+
}
74+
75+
.contact {
76+
font-size: 16px;
77+
font-weight: 400;
78+
line-height: 1.5;
79+
}
80+
81+
.button-container {
82+
display: flex;
83+
justify-content: flex-end;
84+
margin-bottom: 40px;
85+
}
86+
87+
.button {
88+
background: #00B493;
89+
color: white;
90+
font-size: 16px;
91+
font-weight: 400;
92+
padding: 10px 20px;
93+
border-radius: 5px;
94+
display: flex;
95+
align-items: center;
96+
text-decoration: none;
97+
}
98+
99+
.button:hover {
100+
background: #00987A;
101+
}
102+
103+
.button .arrow {
104+
border: solid white;
105+
border-width: 0 2px 2px 0;
106+
display: inline-block;
107+
padding: 5px;
108+
transform: rotate(-45deg);
109+
margin-left: 10px;
110+
}
111+
</style>
112+
</head>
113+
<body>
114+
<div class="email-container">
115+
<div class="logo">
116+
<div class="divider">
117+
<div class="line"></div>
118+
<img src="logo.png" alt="로고">
119+
<div class="line"></div>
120+
</div>
121+
</div>
122+
123+
<div class="title">DASOM</div>
124+
<div class="greeting" th:text="${name} + '님 안녕하세요.'"></div>
125+
<div>컴퓨터공학부 전공동아리 다솜입니다.</div>
126+
127+
<div class="content">
128+
먼저 다솜 34기에 많은 관심을 갖고 지원해 주셔서 감사드리며,
129+
<br> 최종 면접 결과 및 추후 일정에 관해 안내드리고자 이메일을 발송하게 되었습니다.
130+
<br> 모집 폼 합/불합 결과는 아래 버튼 혹은 홈페이지를 통해 확인이 가능합니다.
131+
</div>
132+
133+
<div class="button-container">
134+
<a href="#" class="button">
135+
최종 결과 확인하기 <span class="arrow"></span>
136+
</a>
137+
</div>
138+
139+
<div class="contact">
140+
또한, 문의 사항은 본 메일에 회신 또는 아래 번호로 편하게 연락 부탁드립니다.<br>
141+
010-6361-3481
142+
</div>
143+
</div>
144+
</body>
145+
</html>
5.61 KB
Loading

0 commit comments

Comments
 (0)