feat: Simple nodemailer integration

This commit is contained in:
SauravDhakal
2026-03-07 07:38:50 +05:45
parent 496d689ec1
commit 6fc494687a
12 changed files with 266 additions and 7 deletions

45
common/emails/auth.ts Normal file
View File

@@ -0,0 +1,45 @@
export const welcomeToApp =
`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Research Shock</title>
<style>
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 0; background-color: #f4f7f9; }
.container { max-width: 600px; margin: 20px auto; background: #ffffff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.logo { font-size: 24px; font-weight: bold; color: #2563eb; margin-bottom: 20px; text-align: center; }
h1 { font-size: 22px; color: #111827; }
p { margin-bottom: 20px; color: #4b5563; }
.button { display: inline-block; padding: 12px 24px; background-color: #2563eb; color: #ffffff; text-decoration: none; border-radius: 5px; font-weight: 600; transition: background 0.3s ease; }
.footer { margin-top: 30px; font-size: 12px; color: #9ca3af; text-align: center; }
.divider { height: 1px; background: #e5e7eb; margin: 30px 0; }
</style>
</head>
<body>
<div class="container">
<div class="logo">MultiTenant SaaS</div>
<h1>Welcome to the team!</h1>
<p>Hi there,</p>
<p>Thanks for signing up for <strong>MultiTenant Saas</strong>. We're excited to help you around.</p>
<p>To get started, we recommend setting up your organization profile and inviting your first team member.</p>
<div style="text-align: center; margin: 35px 0;">
<a href="http://localhost:3000" class="button">Go to Dashboard</a>
</div>
<p>If you have any questions, just reply to this email. We're here to help!</p>
<div class="divider"></div>
<p>Cheers,<br>Team</p>
<div class="footer">
&copy; 2026 App. All rights reserved.<br>
If you didn't create an account, you can safely ignore this email.
</div>
</div>
</body>
</html>
`