Login

Create account

Email Template
Istiak Bin Yousuf
Istiak Bin Yousuf

Posted on Oct 2, 2024

Email Template

export const welcomeEmailTemplate = (name) => {
  return `<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Welcome Email</title>
  <style>
    body {
      font-family: 'Helvetica Neue', Arial, sans-serif;
      background-color: #f4f7fa;
      margin: 0;
      padding: 0;
      color: #333;
    }

    .container {
      max-width: 600px;
      margin: 40px auto;
      background-color: #ffffff;
      padding: 40px;
      border-radius: 15px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
      text-align: center;
      position: relative;
      overflow: hidden;
    }

    h1 {
      color: #4CAF50;
      font-size: 28px;
      font-weight: bold;
      margin-bottom: 20px;
    }

    p {
      color: #555;
      font-size: 16px;
      line-height: 1.8;
      margin: 20px 0;
    }

    .welcome-message {
      font-size: 20px;
      font-weight: bold;
      color: #333;
      margin-bottom: 30px;
    }

    .button {
      display: inline-block;
      background-color: #4CAF50;
      color: #fff;
      padding: 15px 30px;
      border-radius: 50px;
      text-decoration: none;
      font-size: 18px;
      margin-top: 20px;
      transition: background-color 0.3s ease;
    }

    .button:hover {
      background-color: #43A047;
    }

    .footer {
      margin-top: 40px;
      text-align: center;
      color: #999;
      font-size: 12px;
    }

    .footer a {
      color: #4CAF50;
      text-decoration: none;
      margin: 0 10px;
    }

    .hero {
      width: 100%;
      height: 200px;
      background-image: url('https://via.placeholder.com/600x200');
      background-size: cover;
      background-position: center;
      margin: -40px -40px 40px;
    }

    .hero h1 {
      background-color: rgba(0, 0, 0, 0.5);
      color: #fff;
      padding: 10px;
      border-radius: 8px;
      display: inline-block;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="hero">
      <h1>Welcome to [Your Platform Name], ${name}!</h1>
    </div>

    <p class="welcome-message">We’re thrilled to have you here! 🎉</p>

    <p>Thank you for verifying your email. You’re all set to explore everything [Your Platform Name] has to offer. Whether you’re here to [insert platform benefit or feature], we’ve got you covered!</p>

    <a href="[Your Dashboard URL]" class="button">Start Your Journey</a>

    <p>We’re always here to help if you need it. Don’t hesitate to reach out to our support team for any assistance.</p>

    <div class="footer">
      <p>&copy; [Your Company Name] | All rights reserved.</p>
      <p><a href="#">Privacy Policy</a> | <a href="#">Contact Support</a></p>
    </div>
  </div>
</body>

</html>
`;
};

Key Enhancements:

  1. Hero Image: A visually engaging header image at the top of the email to make it more welcoming and appealing. You can replace the https://via.placeholder.com/600x200 with your own image URL.

  2. Bold Welcome Message: Personalized greeting that stands out even more, combined with a celebratory emoji (🎉) to make it feel friendly and informal.

  3. Modern Button Style: The CTA button is now a rounded "pill" style with hover effects for an interactive feel.

  4. Enhanced Fonts and Colors: The header is bolder, and the overall color scheme uses modern, vibrant colors like #4CAF50 for primary accents.

  5. Shadow and Layout Effects: The container has a subtle shadow and rounded corners, making the overall design feel more polished and professional.

  6. Friendly and Engaging Copy: The tone of the copy is engaging, inviting, and welcoming, emphasizing that the user is part of something exciting.

Customization Points:

  • Replace the [Your Platform Name] and [Your Dashboard URL] with your actual platform details.
  • Change the hero image URL to fit your brand.
  • Edit the body text to align with your platform’s unique offerings or features.

0 Reactions

0 Bookmarks

Read next

Istiak Bin Yousuf

Istiak Bin Yousuf

Aug 22, 2024

2 min read

Server-Side Vs Client-Side
Istiak Bin Yousuf

Istiak Bin Yousuf

Aug 22, 2024

3 min read

Express.js Vs Nest.js
Istiak Bin Yousuf

Istiak Bin Yousuf

Aug 22, 2024

4 min read

What is MERN Stack?