feat: Enhance email templates and add plain text support for improved deliverability

This commit is contained in:
Christian Krakau-Louis
2025-04-17 22:22:09 +02:00
parent 6753444daf
commit 828719b318
13 changed files with 663 additions and 269 deletions
+61 -31
View File
@@ -12,62 +12,92 @@
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
.container {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background-color: #2D7738;
padding: 20px;
text-align: center;
color: white;
border-radius: 5px 5px 0 0;
}
.content {
padding: 20px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 5px 5px;
padding: 30px;
background-color: #ffffff;
}
.button-container {
margin: 25px 0;
text-align: center;
}
.button {
display: inline-block;
background-color: #2D7738;
color: white;
text-decoration: none;
padding: 10px 20px;
padding: 12px 25px;
border-radius: 5px;
margin: 20px 0;
font-weight: 500;
}
.link-help {
margin-top: 20px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 5px;
font-size: 14px;
}
.footer {
margin-top: 20px;
font-size: 12px;
padding: 20px;
text-align: center;
font-size: 12px;
color: #777;
border-top: 1px solid #eaeaea;
}
</style>
</head>
<body>
<div class="header">
<h1>Verify Your Email Address</h1>
</div>
<div class="content">
<p>Hello {{ username }},</p>
<div class="container">
<div class="header">
<h1>Email Verification</h1>
</div>
<p>Thank you for registering with LeagueLedger! To complete your registration, please verify your email address by clicking the button below:</p>
<div class="content">
<p>Hello {{ username }},</p>
<p>Thank you for creating an account with LeagueLedger, your pub quiz team tracking platform. We're excited to have you join our community!</p>
<p>To ensure account security and complete your registration, please verify your email address by clicking the button below:</p>
<div class="button-container">
<a href="{{ verification_link }}" class="button">Verify My Email</a>
</div>
<div class="link-help">
<p>If the button above doesn't work, you can copy and paste this link into your browser:</p>
<p><a href="{{ verification_link }}">Complete your verification</a></p>
</div>
<p>This verification step helps us keep your account secure and allows you to:</p>
<ul>
<li>Create or join teams</li>
<li>Track your quiz night scores</li>
<li>Earn points and achievements</li>
<li>Climb the leaderboards</li>
</ul>
<p>If you did not create an account with LeagueLedger, please disregard this email.</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<p style="text-align: center;">
<a href="{{ verification_link }}" class="button">Verify Email</a>
</p>
<p>Or copy and paste this link into your browser:</p>
<p>{{ verification_link }}</p>
<p>If you did not create an account with us, please ignore this email.</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<div class="footer">
<p>© LeagueLedger. All rights reserved.</p>
<p>This is an automated message, please do not reply to this email.</p>
<div class="footer">
<p>© 2025 LeagueLedger. All rights reserved.</p>
<p>This email was sent to verify your account registration.</p>
</div>
</div>
</body>
</html>
+89 -33
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Team Join Request Response - LeagueLedger</title>
<title>Team Join Request Update - LeagueLedger</title>
<style>
body {
font-family: Arial, sans-serif;
@@ -12,63 +12,119 @@
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
.container {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background-color: #2D7738;
padding: 20px;
text-align: center;
color: white;
border-radius: 5px 5px 0 0;
}
.content {
padding: 20px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 5px 5px;
padding: 30px;
background-color: #ffffff;
}
.status-message {
margin: 20px 0;
padding: 15px;
border-radius: 5px;
}
.status-approved {
background-color: #e8f5e9;
border-left: 4px solid #2D7738;
}
.status-denied {
background-color: #f5f5f5;
border-left: 4px solid #9e9e9e;
}
.button-container {
margin: 25px 0;
text-align: center;
}
.button {
display: inline-block;
background-color: #2D7738;
color: white;
text-decoration: none;
padding: 10px 20px;
padding: 12px 25px;
border-radius: 5px;
font-weight: 500;
}
.next-steps {
margin-top: 20px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 5px;
margin: 20px 0;
}
.footer {
margin-top: 20px;
font-size: 12px;
padding: 20px;
text-align: center;
font-size: 12px;
color: #777;
border-top: 1px solid #eaeaea;
}
</style>
</head>
<body>
<div class="header">
<h1>Team Join Request {{ "Approved" if is_approved else "Denied" }}</h1>
</div>
<div class="content">
<p>Hello {{ username }},</p>
<div class="container">
<div class="header">
<h1>Team Request {{ "Approved" if is_approved else "Status Update" }}</h1>
</div>
{% if is_approved %}
<p>Good news! Your request to join <strong>{{ team_name }}</strong> has been approved. You are now a member of the team.</p>
{% else %}
<p>We regret to inform you that your request to join <strong>{{ team_name }}</strong> has been denied.</p>
{% endif %}
<div class="content">
<p>Hello {{ username }},</p>
{% if is_approved %}
<div class="status-message status-approved">
<h2>Welcome to the team!</h2>
<p>Your request to join <strong>{{ team_name }}</strong> has been approved. You are now officially a member of the team.</p>
</div>
<p>As a team member, you can now:</p>
<ul>
<li>Participate in team events</li>
<li>Contribute to your team's score</li>
<li>Earn points and achievements together</li>
<li>Track your team's performance on the leaderboard</li>
</ul>
<p>Visit your dashboard to see your team's upcoming events and current standings.</p>
{% else %}
<div class="status-message status-denied">
<p>Your request to join <strong>{{ team_name }}</strong> has not been approved at this time.</p>
<p>Don't worry - there are many teams in LeagueLedger that might be a better fit for you.</p>
</div>
<div class="next-steps">
<h3>What's next?</h3>
<p>You can:</p>
<ul>
<li>Request to join another team</li>
<li>Create your own team</li>
<li>Explore upcoming pub quiz events in your area</li>
</ul>
</div>
{% endif %}
<div class="button-container">
<a href="{{ base_url }}/dashboard" class="button">Go to My Dashboard</a>
</div>
<p>Thank you for being part of the LeagueLedger community!</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<p>You can view your teams by visiting your dashboard:</p>
<p style="text-align: center;">
<a href="{{ base_url }}/dashboard" class="button">Go to Dashboard</a>
</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<div class="footer">
<p>© LeagueLedger. All rights reserved.</p>
<p>This is an automated message, please do not reply to this email.</p>
<div class="footer">
<p>© 2025 LeagueLedger. All rights reserved.</p>
<p>This email was sent to update you about your team join request.</p>
</div>
</div>
</body>
</html>
+67 -32
View File
@@ -12,64 +12,99 @@
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
.container {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background-color: #2D7738;
padding: 20px;
text-align: center;
color: white;
border-radius: 5px 5px 0 0;
}
.content {
padding: 20px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 5px 5px;
padding: 30px;
background-color: #ffffff;
}
.security-note {
padding: 15px;
margin: 20px 0;
background-color: #fff8e1;
border-left: 3px solid #ffd54f;
border-radius: 5px;
}
.button-container {
margin: 25px 0;
text-align: center;
}
.button {
display: inline-block;
background-color: #2D7738;
color: white;
text-decoration: none;
padding: 10px 20px;
padding: 12px 25px;
border-radius: 5px;
margin: 20px 0;
font-weight: 500;
}
.link-help {
margin-top: 20px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 5px;
font-size: 14px;
}
.footer {
margin-top: 20px;
font-size: 12px;
padding: 20px;
text-align: center;
font-size: 12px;
color: #777;
border-top: 1px solid #eaeaea;
}
</style>
</head>
<body>
<div class="header">
<h1>Password Reset</h1>
</div>
<div class="content">
<p>Hello {{ username }},</p>
<p>We received a request to reset your password. If you didn't make this request, you can safely ignore this email.</p>
<p>To reset your password, click the button below:</p>
<div style="margin: 30px 0; text-align: center;">
<a href="{{ reset_url }}" class="button">Reset Password</a>
<div class="container">
<div class="header">
<h1>Password Reset</h1>
</div>
<p>Or you can copy and paste this link into your browser:</p>
<p>{{ reset_url }}</p>
<div class="content">
<p>Hello {{ username }},</p>
<p>We received a request to reset your password for your LeagueLedger account. You can set a new password by clicking the button below:</p>
<div class="button-container">
<a href="{{ reset_url }}" class="button">Reset My Password</a>
</div>
<div class="security-note">
<p><strong>Security Note:</strong> This link will expire in 24 hours for your protection. If you did not request a password reset, please disregard this email and consider reviewing your account security.</p>
</div>
<div class="link-help">
<p>If the button above doesn't work, you can copy and paste this link into your browser:</p>
<p><a href="{{ reset_url }}">Reset your password</a></p>
</div>
<p>With LeagueLedger, you can continue to:</p>
<ul>
<li>Track your team's progress in pub quiz events</li>
<li>View your rank on the leaderboard</li>
<li>Manage your team memberships</li>
<li>Redeem QR codes for points</li>
</ul>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<p>This link will expire in 24 hours.</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<div class="footer">
<p>© LeagueLedger. All rights reserved.</p>
<p>This is an automated message, please do not reply to this email.</p>
<div class="footer">
<p>© 2025 LeagueLedger. All rights reserved.</p>
<p>This email was sent in response to your password reset request.</p>
</div>
</div>
</body>
</html>
+69 -37
View File
@@ -12,19 +12,27 @@
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
.container {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background-color: #2D7738;
padding: 20px;
text-align: center;
color: white;
border-radius: 5px 5px 0 0;
}
.content {
padding: 20px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 5px 5px;
padding: 30px;
background-color: #ffffff;
}
.button-container {
margin: 25px 0;
text-align: center;
}
.button {
display: inline-block;
@@ -33,54 +41,78 @@
text-decoration: none;
padding: 10px 20px;
border-radius: 5px;
margin: 20px 0;
font-weight: 500;
}
.button.approve {
background-color: #4CAF50;
background-color: #2D7738;
}
.button.deny {
background-color: #f44336;
background-color: #9e9e9e;
margin-left: 10px;
}
.footer {
.link-help {
margin-top: 20px;
font-size: 12px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 5px;
font-size: 14px;
}
.footer {
padding: 20px;
text-align: center;
font-size: 12px;
color: #777;
border-top: 1px solid #eaeaea;
}
.message-box {
margin: 15px 0;
padding: 15px;
background-color: #f5f5f5;
border-radius: 5px;
border-left: 3px solid #2D7738;
}
</style>
</head>
<body>
<div class="header">
<h1>Team Join Request</h1>
</div>
<div class="content">
<p>Hello {{ captain_name }},</p>
<p><strong>{{ requester_name }}</strong> has requested to join your team <strong>{{ team_name }}</strong>.</p>
{% if message %}
<p>Message from {{ requester_name }}:<br><em>"{{ message }}"</em></p>
{% endif %}
<p>You can approve or deny this request by clicking one of the buttons below:</p>
<div style="margin: 30px 0; text-align: center;">
<a href="{{ approve_url }}" class="button approve">Approve Request</a>
<a href="{{ deny_url }}" class="button deny">Deny Request</a>
<div class="container">
<div class="header">
<h1>Team Join Request</h1>
</div>
<p>Or you can copy and paste one of these links into your browser:</p>
<p>Approve: {{ approve_url }}</p>
<p>Deny: {{ deny_url }}</p>
<div class="content">
<p>Hello {{ captain_name }},</p>
<p>We hope this email finds you well. <strong>{{ requester_name }}</strong> has requested to join your team <strong>{{ team_name }}</strong> on LeagueLedger.</p>
{% if message %}
<div class="message-box">
<p><strong>Message from {{ requester_name }}:</strong></p>
<p><em>"{{ message }}"</em></p>
</div>
{% endif %}
<p>As the team captain, you can review this request and decide whether to approve or deny it.</p>
<div class="button-container">
<a href="{{ approve_url }}" class="button approve">Approve Request</a>
<a href="{{ deny_url }}" class="button deny">Decline Request</a>
</div>
<div class="link-help">
<p>If the buttons above don't work, you can copy and paste one of these links into your browser:</p>
<p>To approve: <a href="{{ approve_url }}">Accept team member</a></p>
<p>To decline: <a href="{{ deny_url }}">Decline request</a></p>
</div>
<p>Thank you for being an active team captain in our community!</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<div class="footer">
<p>© LeagueLedger. All rights reserved.</p>
<p>This is an automated message, please do not reply to this email.</p>
<div class="footer">
<p>© 2025 LeagueLedger. All rights reserved.</p>
<p>This message was sent regarding team management in your LeagueLedger account.</p>
</div>
</div>
</body>
</html>
+70 -36
View File
@@ -12,67 +12,101 @@
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
.container {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background-color: #2D7738;
padding: 20px;
padding: 25px;
text-align: center;
color: white;
border-radius: 5px 5px 0 0;
}
.content {
padding: 30px;
background-color: #ffffff;
}
.feature-list {
background-color: #f5f5f5;
padding: 20px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 5px 5px;
margin: 20px 0;
border-radius: 8px;
}
.button-container {
margin: 25px 0;
text-align: center;
}
.button {
display: inline-block;
background-color: #2D7738;
color: white;
text-decoration: none;
padding: 10px 20px;
padding: 12px 25px;
border-radius: 5px;
margin: 20px 0;
font-weight: 500;
}
.getting-started {
margin-top: 20px;
padding: 15px;
background-color: #e8f5e9;
border-radius: 5px;
border-left: 4px solid #2D7738;
}
.footer {
margin-top: 20px;
font-size: 12px;
padding: 20px;
text-align: center;
font-size: 12px;
color: #777;
border-top: 1px solid #eaeaea;
}
</style>
</head>
<body>
<div class="header">
<h1>Welcome to LeagueLedger!</h1>
</div>
<div class="content">
<p>Hello {{ username }},</p>
<div class="container">
<div class="header">
<h1>Welcome to LeagueLedger!</h1>
</div>
<p>Welcome to LeagueLedger! We're excited to have you join our community.</p>
<div class="content">
<p>Hello {{ username }},</p>
<p>Thank you for joining LeagueLedger! We're delighted to have you as part of our community of pub quiz enthusiasts.</p>
<div class="feature-list">
<h3>With your new account, you can:</h3>
<ul>
<li><strong>Join or create teams</strong> - Connect with friends and form your pub quiz dream team</li>
<li><strong>Track your progress</strong> - Keep a record of all your quiz results in one place</li>
<li><strong>Earn achievements</strong> - Get recognition for your team's accomplishments</li>
<li><strong>Compete on leaderboards</strong> - See how your team ranks against others</li>
<li><strong>Scan QR codes</strong> - Easily record your points after quiz nights</li>
</ul>
</div>
<div class="getting-started">
<h3>Getting Started</h3>
<p>The best way to begin is to either join an existing team or create your own. Visit your dashboard to get started!</p>
</div>
<div class="button-container">
<a href="{{ base_url }}/dashboard" class="button">Go to My Dashboard</a>
</div>
<p>If you have any questions or need assistance, you can reply to this email or visit our help center.</p>
<p>We're excited to see you and your team climb the leaderboards!</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<p>With LeagueLedger, you can:</p>
<ul>
<li>Track your team's progress</li>
<li>Participate in events</li>
<li>Collect points and earn achievements</li>
<li>Connect with other teams and players</li>
</ul>
<p>If you have any questions or need assistance, feel free to reach out to our support team.</p>
<p style="text-align: center;">
<a href="{{ base_url }}/dashboard" class="button">Go to Dashboard</a>
</p>
<p>Best regards,<br>The LeagueLedger Team</p>
</div>
<div class="footer">
<p>© LeagueLedger. All rights reserved.</p>
<p>This is an automated message, please do not reply to this email.</p>
<div class="footer">
<p>© 2025 LeagueLedger. All rights reserved.</p>
<p>This email was sent to welcome you to the LeagueLedger platform.</p>
</div>
</div>
</body>
</html>