Skip to main content

Email Templates

This page provides basic email templates for the MicDots notification system.

Overview

The MicDots platform sends three types of automated emails during the request lifecycle:

  1. Confirmation Email - When user submits a request
  2. Processing Email - When admin starts processing the request
  3. Done Email - When audio is ready with QR code

📑 Email Template Index

Email Templates:

Reference Sections:


1. Welcome Email Template

Subject: Welcome to MicDots

Description: Sent when a new client registers on the platform.

Variables:

  • {{UserName}} - User's full name
  • {{Email}} - User's email address
  • {{LoginUrl}} - Login page URL

Email Content (HTML):

<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px 20px;
border-radius: 8px 8px 0 0;
text-align: center;
}
.button {
display: inline-block;
padding: 12px 32px;
background: #667eea;
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Welcome to MicDots!</h1>
</div>

<div style="padding: 30px;">
<p>Hi {{UserName}},</p>

<p>Thank you for registering with MicDots! Your account has been successfully created.</p>

<p><strong>Your registered email:</strong> {{Email}}</p>

<div style="text-align: center; margin: 20px 0;">
<a href="{{LoginUrl}}" class="button">Login to Your Account</a>
</div>

<h3>What you can do with MicDots:</h3>
<ul>
<li>Convert text to high-quality audio</li>
<li>Choose from multiple voice options</li>
<li>Generate QR codes for easy sharing</li>
</ul>
</div>

<div style="background: #f5f5f5; padding: 20px; text-align: center; font-size: 12px;">
<p>Need help? Contact us at <a href="mailto:support@micdots.com">support@micdots.com</a></p>
</div>
</div>
</body>
</html>

Email Content (Plain Text):

Welcome to MicDots!

Hi {{UserName}},

Thank you for registering with MicDots! Your account has been successfully created.

Your registered email: {{Email}}

Login to your account: {{LoginUrl}}

What you can do with MicDots:
- Convert text to high-quality audio
- Choose from multiple voice options
- Generate QR codes for easy sharing

---

Need help? Contact us at support@micdots.com

2. Request Confirmation Email

Subject: Your MicDots request has been received

Variables:

  • {{RequestId}} - Unique request identifier
  • {{VoiceName}} - Selected voice name
  • {{TextPreview}} - First 100 characters of submitted text

Email Content (HTML):

<!DOCTYPE html>
<html>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
<h1 style="color: #4d7cfe;">Request Received ✓</h1>

<p>Thank you for your MicDots request!</p>

<div style="background: #f5f5f5; padding: 16px; border-radius: 8px; margin: 20px 0;">
<p><strong>Request ID:</strong> {{RequestId}}</p>
<p><strong>Voice:</strong> {{VoiceName}}</p>
</div>

<div style="background: #e3f2fd; padding: 16px; border-radius: 8px; margin: 20px 0;">
<p><strong>Text Preview:</strong></p>
<p style="font-style: italic;">"{{TextPreview}}..."</p>
</div>

<p>You'll receive another email when your audio is ready.</p>
</div>
</body>
</html>

Email Content (Plain Text):

Request Received ✓

Thank you for your MicDots request!

Request ID: {{RequestId}}
Voice: {{VoiceName}}

Text Preview:
"{{TextPreview}}..."

You'll receive another email when your audio is ready.

3. Processing Email

Subject: Your audio is being generated

Variables:

  • {{RequestId}} - Unique request identifier
  • {{VoiceName}} - Selected voice name

Email Content (HTML):

<!DOCTYPE html>
<html>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
<h1 style="color: #4d7cfe;">We're Working on Your Audio 🔄</h1>

<p>Great news! We've started processing your request.</p>

<div style="background: #f5f5f5; padding: 16px; border-radius: 8px; margin: 20px 0;">
<p><strong>Request ID:</strong> {{RequestId}}</p>
<p><strong>Voice:</strong> {{VoiceName}}</p>
<p><strong>Status:</strong> <span style="color: #4d7cfe; font-weight: bold;">Processing</span></p>
</div>

<p>You'll receive another email when your audio is ready.</p>
</div>
</body>
</html>

Email Content (Plain Text):

We're Working on Your Audio 🔄

Great news! We've started processing your request.

Request ID: {{RequestId}}
Voice: {{VoiceName}}
Status: Processing

You'll receive another email when your audio is ready.

4. Audio Ready Email

Subject: Your audio is ready! 🎉

Variables:

  • {{RequestId}} - Unique request identifier
  • {{VoiceName}} - Selected voice name
  • {{PlaybackUrl}} - Direct link to play the audio
  • {{QrCodeUrl}} - URL to the QR code image

Email Content (HTML):

<!DOCTYPE html>
<html>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
<h1 style="color: #4ade80;">Your Audio is Ready! 🎉</h1>

<p>Your text-to-audio request has been completed successfully!</p>

<div style="background: #e8f5e9; padding: 20px; border-radius: 8px; margin: 24px 0;">
<h3 style="color: #2e7d32;">🎙️ Listen Now</h3>
<p style="text-align: center;">
<a href="{{PlaybackUrl}}" style="display: inline-block; padding: 12px 32px; background: #4d7cfe; color: white; text-decoration: none; border-radius: 6px; font-weight: bold;">
Play Audio
</a>
</p>
</div>

<div style="background: #f5f5f5; padding: 20px; border-radius: 8px; text-align: center;">
<h3>📱 Your QR Code</h3>
<img src="{{QrCodeUrl}}" alt="QR Code" style="max-width: 300px; width: 100%;">
<p style="margin-top: 16px;">
<a href="{{QrCodeUrl}}" download style="display: inline-block; padding: 10px 24px; background: #f093fb; color: white; text-decoration: none; border-radius: 6px; font-weight: bold;">
Download QR Code
</a>
</p>
</div>

<div style="background: #e3f2fd; padding: 16px; border-radius: 8px; margin: 24px 0;">
<h4 style="color: #1976d2;">💡 How to use your QR code:</h4>
<ul>
<li><strong>Print:</strong> Add to menus, posters, or business cards</li>
<li><strong>Digital:</strong> Include in emails or presentations</li>
<li><strong>Scan:</strong> Anyone can scan to hear the audio</li>
</ul>
</div>
</div>
</body>
</html>

Email Content (Plain Text):

Your Audio is Ready! 🎉

Your text-to-audio request has been completed successfully!

🎙️ Listen Now

Play your audio: {{PlaybackUrl}}

📱 Your QR Code

Download your QR code: {{QrCodeUrl}}

💡 How to use your QR code:

- Print: Add to menus, posters, or business cards
- Digital: Include in emails or presentations
- Scan: Anyone can scan to hear the audio

5. Password Reset Email

Subject: Reset your MicDots password

Variables:

  • {{UserName}} - User's full name
  • {{ResetUrl}} - Password reset link with token
  • {{ExpiryTime}} - Link expiration time

Email Content (HTML):

<!DOCTYPE html>
<html>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
<h1 style="color: #667eea;">Reset Your Password</h1>

<p>Hi {{UserName}},</p>

<p>We received a request to reset your password.</p>

<div style="text-align: center; margin: 20px 0;">
<a href="{{ResetUrl}}" style="display: inline-block; padding: 12px 32px; background: #667eea; color: white; text-decoration: none; border-radius: 6px; font-weight: bold;">
Reset Password
</a>
</div>

<div style="background: #fff3cd; padding: 16px; border-radius: 8px; margin: 20px 0;">
<p><strong>⚠️ Important:</strong> This link expires in {{ExpiryTime}}.</p>
</div>

<p>If you didn't request this, you can safely ignore this email.</p>
</div>
</body>
</html>

Email Content (Plain Text):

Reset Your Password

Hi {{UserName}},

We received a request to reset your password.

Reset your password: {{ResetUrl}}

⚠️ Important: This link expires in {{ExpiryTime}}.

If you didn't request this, you can safely ignore this email.

Template Variables

Common Variables

  • {{UserName}} - User's full name
  • {{Email}} - User's email address
  • {{CurrentYear}} - Current year

Request Variables

  • {{RequestId}} - Request identifier
  • {{VoiceName}} - Selected voice
  • {{TextPreview}} - First 100 characters
  • {{PlaybackUrl}} - Audio player link
  • {{QrCodeUrl}} - QR code image URL

Auth Variables

  • {{LoginUrl}} - Login page URL
  • {{ResetUrl}} - Password reset link
  • {{ExpiryTime}} - Link expiration time

Email Configuration

Configure SMTP settings:

EMAIL_PROVIDER=sendgrid
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=your_api_key
EMAIL_FROM=noreply@micdots.com

Testing

Test with cURL

# Test welcome email
curl -X POST http://localhost:5000/api/v1/test/email/welcome \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"userName": "John Doe"
}'