Introduced support for MailerSend as an email provider alongside SMTP, with configuration options in settings. Added Jinja2-based multi-language email templates for verification emails, and refactored the email sending logic to use these templates and support language selection based on user country code. Updated related services and API endpoints to pass country code and handle new response formats. Added dependencies for Jinja2 and MailerSend.
142 lines
4.0 KiB
HTML
142 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Email Verification - {{ server_name }}</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
|
|
background-color: #f5f5f5;
|
|
}
|
|
.container {
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
background-color: #ffffff;
|
|
}
|
|
.header {
|
|
background: linear-gradient(135deg, #ED8EA6 0%, #FF6B9D 100%);
|
|
color: white;
|
|
padding: 40px 20px;
|
|
text-align: center;
|
|
}
|
|
.header h1 {
|
|
margin: 0;
|
|
font-size: 28px;
|
|
font-weight: 600;
|
|
}
|
|
.header p {
|
|
margin: 10px 0 0 0;
|
|
font-size: 16px;
|
|
opacity: 0.9;
|
|
}
|
|
.content {
|
|
padding: 40px 30px;
|
|
}
|
|
.greeting {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
}
|
|
.message {
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
color: #555;
|
|
margin-bottom: 30px;
|
|
}
|
|
.code-box {
|
|
background: #f8f9fa;
|
|
border: 2px solid #ED8EA6;
|
|
border-radius: 12px;
|
|
padding: 25px;
|
|
text-align: center;
|
|
margin: 30px 0;
|
|
}
|
|
.code {
|
|
font-size: 36px;
|
|
font-weight: bold;
|
|
letter-spacing: 8px;
|
|
color: #ED8EA6;
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
.expiry {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-top: 15px;
|
|
}
|
|
.warning-box {
|
|
background: #fff3cd;
|
|
border-left: 4px solid #ffc107;
|
|
border-radius: 6px;
|
|
padding: 20px;
|
|
margin: 30px 0;
|
|
}
|
|
.warning-box h3 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 16px;
|
|
color: #856404;
|
|
}
|
|
.warning-box ul {
|
|
margin: 10px 0;
|
|
padding-left: 20px;
|
|
color: #856404;
|
|
}
|
|
.warning-box li {
|
|
margin: 8px 0;
|
|
font-size: 14px;
|
|
}
|
|
.footer {
|
|
background: #2c3e50;
|
|
color: #ecf0f1;
|
|
padding: 30px;
|
|
text-align: center;
|
|
font-size: 13px;
|
|
}
|
|
.footer p {
|
|
margin: 5px 0;
|
|
line-height: 1.5;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>Email Verification</h1>
|
|
<p>Verify Your Account</p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="greeting">Hello, {{ username }}!</div>
|
|
|
|
<div class="message">
|
|
<p>Thank you for registering with {{ server_name }}. To complete your account verification, please use the following verification code:</p>
|
|
</div>
|
|
|
|
<div class="code-box">
|
|
<div class="code">{{ code }}</div>
|
|
<div class="expiry">This code will expire in <strong>{{ expiry_minutes }} minutes</strong></div>
|
|
</div>
|
|
|
|
<div class="warning-box">
|
|
<h3>Security Notice</h3>
|
|
<ul>
|
|
<li>Do not share this verification code with anyone</li>
|
|
<li>If you did not request this code, please ignore this email</li>
|
|
<li>For your account security, do not use the same password on other websites</li>
|
|
<li>This code can only be used once</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>© {{ year }} {{ server_name }}. All rights reserved.</p>
|
|
<p>This email was sent automatically, please do not reply.</p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|