feat: nicer email
This commit is contained in:
parent
283a6a8ac1
commit
da63609101
|
|
@ -40,10 +40,61 @@ export class EmailService {
|
|||
return;
|
||||
}
|
||||
|
||||
const modifiedHtml = `
|
||||
<div style="
|
||||
background: linear-gradient(to bottom right, #e6f2ff, #f0e6ff);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
">
|
||||
<div style="
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
backdrop-filter: blur(4px);
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
max-width: 48rem;
|
||||
width: 100%;
|
||||
padding: 2rem;
|
||||
">
|
||||
<h1 style="
|
||||
font-size: 1.875rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1.5rem;
|
||||
text-align: left;
|
||||
color: #1f2937;
|
||||
">${subject}</h1>
|
||||
|
||||
<div style="
|
||||
margin-bottom: 2rem;
|
||||
color: #374151;
|
||||
">
|
||||
${html}
|
||||
</div>
|
||||
|
||||
<div style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-top: 1px solid #e5e7eb;
|
||||
padding-top: 1.5rem;
|
||||
">
|
||||
<div>
|
||||
<h2 style="
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: #1f2937;
|
||||
margin: 0;
|
||||
">${process.env.EMAIL_FROM_NAME}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const sends = await this.emailService.sendEmail(
|
||||
to,
|
||||
subject,
|
||||
html,
|
||||
modifiedHtml,
|
||||
process.env.EMAIL_FROM_NAME,
|
||||
process.env.EMAIL_FROM_ADDRESS
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue