11import { Rss } from '../../rss/entity/rss.entity' ;
2+ export const PRODUCT_DOMAIN = 'https://denamu.site' ;
23
3- export function createMailContent (
4+ export function createRssRegistrationContent (
45 rss : Rss ,
56 approveFlag : boolean ,
67 serviceAddress : string ,
@@ -23,7 +24,7 @@ export function createMailContent(
2324 <p><strong>블로거 이름:</strong> ${ rss . userName } </p>
2425 <p><strong>RSS 주소:</strong> ${ rss . rssUrl } </p>
2526 </div>
26- ${ approveFlag ? acceptContent ( rss ) : rejectContent ( rss , description ) }
27+ ${ approveFlag ? acceptContent ( ) : rejectContent ( description ) }
2728 <center>
2829 <a href="https://denamu.site" style="display: inline-block; padding: 12px 24px; background-color: #007bff; color: #ffffff; text-decoration: none; border-radius: 4px; margin: 20px 0;">${ approveFlag ? '서비스 바로가기' : '다시 신청하러 가기' } </a>
2930 </center>
@@ -38,17 +39,54 @@ export function createMailContent(
3839` ;
3940}
4041
41- function acceptContent ( rss : Rss ) {
42+ function acceptContent ( ) {
4243 return `
4344 <p>안녕하세요! 귀하의 블로그가 저희 서비스에 성공적으로 등록되었음을 알려드립니다.</p>
4445 <p>이제 귀하의 새로운 글이 업데이트될 때마다 저희 플랫폼에서 확인하실 수 있습니다.</p>
4546 ` ;
4647}
4748
48- function rejectContent ( rss : Rss , description : string ) {
49+ function rejectContent ( description : string ) {
4950 return `
5051 <p><strong>거부 사유:</strong></p>
5152 <div style="background-color: #f8f9fa; border-radius: 8px; padding: 15px 20px; margin: 15px 0; color: #666; line-height: 1.6;">${ description } </div>
5253 <p>위 사유를 해결하신 후 다시 신청해 주시기 바랍니다.</p>
5354 ` ;
5455}
56+
57+ export function createVerificationMailContent (
58+ userName : string ,
59+ verificationLink : string ,
60+ serviceAddress : string ,
61+ ) {
62+ return `
63+ <div style="font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif; margin: 0; padding: 1px; background-color: #f4f4f4;">
64+ <div style="max-width: 600px; margin: 20px auto; background-color: #ffffff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
65+ <div style="text-align: center; padding: 20px 0; border-bottom: 2px solid #f0f0f0;">
66+ <img src="https://denamu.site/files/Denamu_Logo_KOR.png" alt="Denamu Logo" width="244" height="120">
67+ </div>
68+ <div style="padding: 20px 0;">
69+ <div style="color: #007bff; font-size: 24px; font-weight: bold; margin-bottom: 20px; text-align: center;">회원가입 인증을 완료해주세요</div>
70+ <div style="background-color: #f8f9fa; padding: 15px; border-radius: 4px; margin: 15px 0;">
71+ <p><strong>안녕하세요, ${ userName } 님!</strong></p>
72+ <p>Denamu 서비스에 가입해 주셔서 감사합니다.</p>
73+ <p>아래 버튼을 클릭하여 회원가입 인증을 완료해 주세요.</p>
74+ </div>
75+ <center>
76+ <a href="${ verificationLink } " style="display: inline-block; padding: 12px 24px; background-color: #007bff; color: #ffffff; text-decoration: none; border-radius: 4px; margin: 20px 0; font-weight: bold;">이메일 인증하기</a>
77+ </center>
78+ <div style="font-size: 14px; color: #6c757d; margin-top: 20px; text-align: center;">
79+ <p>버튼이 작동하지 않는 경우, 아래 링크를 복사하여 브라우저에 붙여넣기 해주세요:</p>
80+ <p style="word-break: break-all; background-color: #f8f9fa; padding: 10px; border-radius: 4px;">${ verificationLink } </p>
81+ <p>이 링크는 10분 동안 유효합니다.</p>
82+ </div>
83+ </div>
84+ </div>
85+ <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border-top: 2px solid #f0f0f0; color: #6c757d; font-size: 14px; height: 100px;">
86+ <p>본 메일은 발신전용입니다.</p>
87+ <p>문의사항이 있으시다면 ${ serviceAddress } 로 연락주세요.</p>
88+ </div>
89+ </div>
90+ </div>
91+ ` ;
92+ }
0 commit comments