Skip to content

Latest commit

 

History

History
676 lines (523 loc) · 17 KB

File metadata and controls

676 lines (523 loc) · 17 KB

🚀 Complete Domain & Email Setup Plan for SaveMyTime.bg

Project: savemytime-ai-platform Vercel URL: https://vercel.com/infoheaveninteractive-2456s-projects/savemytime-ai-platform Domain: savemytime.bg (Super Hosting) Email: info@savemytime.bg (Hostinger) Phone: 0875354887 Date: January 20, 2026


📋 Executive Summary

Objective: Connect custom domain savemytime.bg to Vercel project and configure email notifications for contact form submissions.

Current State:

  • ✅ Vercel project deployed
  • ❌ Custom domain not connected
  • ❌ Contact form saves to database but doesn't send emails
  • ❌ Old phone number (+359 888 123 456)
  • ❌ Old email (info@savemytime.dev)

Target State:

  • ✅ Custom domain savemytime.bg pointing to Vercel
  • ✅ Contact form submissions sent to info@savemytime.bg
  • ✅ Updated phone number: 0875354887
  • ✅ Updated email: info@savemytime.bg

🎯 Implementation Strategy

Phase 1: Domain Connection (Super Hosting → Vercel)

Phase 2: Email Setup (Hostinger → Contact Form)

Phase 3: Content Updates (Phone & Email)

Phase 4: Testing & Verification


📊 Phase 1: Domain Connection

1.1 Vercel Configuration

Navigate to Vercel Dashboard:

  1. Go to: https://vercel.com/infoheaveninteractive-2456s-projects/savemytime-ai-platform
  2. Click SettingsDomains
  3. Click Add button
  4. Enter: savemytime.bg
  5. Click Add

Vercel will provide DNS records:

Type: A
Name: @ (or savemytime.bg)
Value: 76.76.21.21

Type: CNAME
Name: www
Value: cname.vercel-dns.com

1.2 Super Hosting DNS Configuration

Access Super Hosting DNS Management:

  1. Log in to Super Hosting control panel
  2. Navigate to Domain Management
  3. Select savemytime.bg
  4. Go to DNS Zone Editor

Add/Update DNS Records:

Step 1: Remove existing A records (if any)

  • Delete old A record pointing to old server

Step 2: Add Vercel A record

Type: A
Host: @ (or leave blank for root domain)
Points to: 76.76.21.21
TTL: 3600 (or Auto)

Step 3: Add Vercel CNAME for www

Type: CNAME
Host: www
Points to: cname.vercel-dns.com.
TTL: 3600

Step 4: Preserve email MX records (CRITICAL) Ensure these Hostinger MX records remain intact:

Type: MX
Priority: 10
Host: @
Points to: mx1.hostinger.com

Type: MX
Priority: 20
Host: @
Points to: mx2.hostinger.com

Step 5: Preserve email SPF record (if exists)

Type: TXT
Host: @
Value: v=spf1 include:_spf.mx.hostinger.com ~all

1.3 Propagation Time

  • Initial DNS propagation: 15-30 minutes
  • Full global propagation: 24-48 hours
  • Vercel SSL certificate: Automatic after domain verification (5-15 minutes)

1.4 Verification

Check DNS Propagation:

# Check A record
dig savemytime.bg +short
# Should return: 76.76.21.21

# Check CNAME
dig www.savemytime.bg +short
# Should return: cname.vercel-dns.com.

# Check MX records
dig savemytime.bg MX +short
# Should return: mx1.hostinger.com and mx2.hostinger.com

Online Tools:


📧 Phase 2: Email Setup

Problem Analysis

Current Implementation:

  • Contact form saves to Supabase database (✅ Works)
  • NO email sending functionality (❌ Missing)
  • User sees success message but owner doesn't receive notification

Solution Options:

Option A: Resend (Recommended) - Simple, Modern, Free Tier

Why Resend:

  • ✅ Simple API
  • ✅ 3,000 emails/month free
  • ✅ Excellent deliverability
  • ✅ React Email templates support
  • ✅ Works great with Vercel
  • ✅ No SMTP complexity

Setup Steps:

  1. Create account at https://resend.com
  2. Verify domain or use Resend domain
  3. Add API key to Vercel environment
  4. Install Resend library
  5. Create Supabase Edge Function to send emails
  6. Update contact form to trigger function

Option B: Hostinger SMTP - Use Existing Email

Why Hostinger SMTP:

  • ✅ Already have email hosted
  • ✅ No third-party dependency
  • ✅ Direct sending from info@savemytime.bg
  • ❌ Requires SMTP credentials
  • ❌ More complex setup
  • ❌ Potential rate limits

Setup Steps:

  1. Get SMTP credentials from Hostinger
  2. Create Supabase Edge Function with Nodemailer
  3. Store credentials securely
  4. Configure email sending

Option C: SendGrid - Enterprise Level

Why SendGrid:

  • ✅ Very reliable
  • ✅ 100 emails/day free
  • ✅ Advanced features
  • ❌ More complex than Resend
  • ❌ Requires API key management

RECOMMENDED: Option A (Resend)


🔧 Phase 2 Implementation: Resend Email Setup

2.1 Resend Account Setup

Step 1: Create Resend Account

  1. Go to https://resend.com
  2. Sign up with email
  3. Verify email address

Step 2: Get API Key

  1. Go to Dashboard → API Keys
  2. Click Create API Key
  3. Name: "SaveMyTime Production"
  4. Copy the API key (starts with re_)
  5. SAVE THIS KEY - shown only once

Example: re_abc123xyz789def456ghi012jkl345mno

Step 3: Domain Verification (Optional but Recommended)

Option 3a: Verify savemytime.bg

  1. Resend Dashboard → Domains → Add Domain
  2. Enter: savemytime.bg
  3. Resend provides DKIM, SPF, DMARC records
  4. Add these to Super Hosting DNS
  5. Verify in Resend

Records to add to Super Hosting:

Type: TXT
Host: resend._domainkey
Value: [Resend provides this]

Type: TXT
Host: @
Value: [Resend SPF record - merge with existing]

Type: TXT
Host: _dmarc
Value: [Resend DMARC record]

Option 3b: Use Resend's Domain (Easier)

  • Send from: noreply@resend.dev (on your behalf)
  • No DNS setup needed
  • Reply-to: info@savemytime.bg
  • This works immediately

2.2 Vercel Environment Variables

Add to Vercel:

  1. Vercel Dashboard → Settings → Environment Variables
  2. Add new variable:
Key: RESEND_API_KEY
Value: re_abc123xyz789def456ghi012jkl345mno
Environments: ☑ Production ☑ Preview ☑ Development

2.3 Code Implementation

Install Resend:

cd ~/savemytime-ai-platform
npm install resend

Create Supabase Edge Function: supabase/functions/send-contact-email/index.ts

import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { Resend } from 'npm:resend@2.0.0'

const resend = new Resend(Deno.env.get('RESEND_API_KEY'))

serve(async (req) => {
  // CORS headers
  if (req.method === 'OPTIONS') {
    return new Response('ok', {
      headers: {
        'Access-Control-Allow-Origin': '*',
        'Access-Control-Allow-Methods': 'POST',
        'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
      },
    })
  }

  try {
    const { name, email, phone, company, message } = await req.json()

    // Send email via Resend
    const data = await resend.emails.send({
      from: 'SaveMyTime <noreply@resend.dev>',
      to: ['info@savemytime.bg'],
      replyTo: email,
      subject: `Нова заявка от ${name}`,
      html: `
        <h2>Нова заявка за консултация</h2>
        <p><strong>Име:</strong> ${name}</p>
        <p><strong>Email:</strong> ${email}</p>
        <p><strong>Телефон:</strong> ${phone || 'Не е посочен'}</p>
        <p><strong>Компания:</strong> ${company || 'Не е посочена'}</p>
        <p><strong>Съобщение:</strong></p>
        <p>${message || 'Няма съобщение'}</p>
      `,
    })

    return new Response(JSON.stringify(data), {
      headers: {
        'Content-Type': 'application/json',
        'Access-Control-Allow-Origin': '*',
      },
    })
  } catch (error) {
    return new Response(JSON.stringify({ error: error.message }), {
      status: 400,
      headers: {
        'Content-Type': 'application/json',
        'Access-Control-Allow-Origin': '*',
      },
    })
  }
})

Update Contact Form: In src/pages/Contact.tsx, add after Supabase insert:

// Send email notification
try {
  await supabase.functions.invoke('send-contact-email', {
    body: {
      name: data.name,
      email: data.email,
      phone: data.phone || '',
      company: data.company || '',
      message: data.message || ''
    }
  });
} catch (emailError) {
  console.error("Email sending failed:", emailError);
  // Don't fail the whole submission if email fails
}

2.4 Supabase Configuration

Deploy Edge Function:

cd ~/savemytime-ai-platform
npx supabase functions deploy send-contact-email

Add Resend Secret to Supabase:

  1. Supabase Dashboard → Project Settings → Edge Functions → Secrets
  2. Add new secret:
    • Name: RESEND_API_KEY
    • Value: re_abc123xyz789def456ghi012jkl345mno
  3. Save

✏️ Phase 3: Content Updates

3.1 Phone Number Update

Old: +359 888 123 456 New: 0875354887 (Bulgarian mobile format)

Files to update:

  1. src/pages/Contact.tsx (line 107, 108)
  2. src/components/Footer.tsx or src/components/layout/Footer.tsx
  3. src/components/home/CTASection.tsx (if exists)
  4. src/i18n/locales/bg.json
  5. src/i18n/locales/en.json
  6. src/i18n/locales/es.json
  7. src/i18n/locales/ru.json
  8. index.html (meta tags)
  9. public/legal/privacy-policy.md
  10. public/legal/cookie-policy.md
  11. public/legal/terms-of-service.md

Format variations:

  • Display: 0875 354 887 (with spaces)
  • Tel link: tel:+359875354887 (international format)

3.2 Email Update

Old: info@savemytime.dev New: info@savemytime.bg

Files to update: (same list as phone)

3.3 Domain References

Update all references from:

  • savemytime-ai-platform.vercel.appsavemytime.bg
  • savemytime.devsavemytime.bg

✅ Phase 4: Testing & Verification

4.1 Domain Testing

Test Checklist:

4.2 Email Testing

Test Scenarios:

Test 1: Basic Email Delivery

  1. Fill contact form on savemytime.bg
  2. Submit with test data
  3. Check info@savemytime.bg inbox
  4. Verify email received
  5. Check sender, reply-to, subject, content

Test 2: Reply Functionality

  1. Reply to contact email
  2. Should go to original sender's email
  3. Verify reply-to header works

Test 3: Error Handling

  1. Submit form with Resend API down
  2. Verify form still saves to database
  3. Verify user sees appropriate message

Test 4: Spam Filtering

  1. Check if emails land in spam
  2. If yes, adjust SPF/DKIM/DMARC
  3. Ask Hostinger to whitelist sender

4.3 Phone Testing

Test Checklist:

  • Click phone number on desktop (should offer to call)
  • Click phone number on mobile (should open dialer)
  • Verify correct number displayed: 0875 354 887
  • Verify tel: link is +359875354887
  • Test in all language versions (BG, EN, ES, RU)

🔐 Credentials & Access Information

Vercel Access

Super Hosting (Domain)

  • Domain: savemytime.bg
  • Provider: Super Hosting
  • DNS Management: [Need login credentials from user]
  • Action Required: Login to control panel → DNS Zone Editor

Hostinger (Email)

Resend (Email Service) - NEW

  • Website: https://resend.com
  • Action Required: Create account, get API key
  • API Key: Store in Vercel environment variables

Supabase

  • Project: [Linked to savemytime-ai-platform]
  • Action Required: Add Resend API key to Edge Function secrets

📝 Step-by-Step Execution Checklist

STEP 1: Domain Connection (30 min)

  • 1.1 Add domain in Vercel
  • 1.2 Note down Vercel DNS records
  • 1.3 Log in to Super Hosting
  • 1.4 Update A record to 76.76.21.21
  • 1.5 Add CNAME for www → cname.vercel-dns.com
  • 1.6 Verify MX records for email remain intact
  • 1.7 Wait 15-30 minutes for propagation
  • 1.8 Test domain access
  • 1.9 Verify SSL certificate

STEP 2: Resend Setup (20 min)

  • 2.1 Create Resend account
  • 2.2 Get API key
  • 2.3 Add API key to Vercel environment variables
  • 2.4 Install resend package
  • 2.5 Create Edge Function code
  • 2.6 Deploy Edge Function to Supabase
  • 2.7 Add Resend API key to Supabase secrets
  • 2.8 Update Contact form to call function

STEP 3: Content Updates (15 min)

  • 3.1 Update phone number to 0875354887
  • 3.2 Update email to info@savemytime.bg
  • 3.3 Update domain references
  • 3.4 Commit changes to git
  • 3.5 Deploy to Vercel

STEP 4: Testing (20 min)

  • 4.1 Test domain access (http, https, www)
  • 4.2 Test contact form submission
  • 4.3 Check email received at info@savemytime.bg
  • 4.4 Test phone number clicks
  • 4.5 Verify all pages load correctly
  • 4.6 Test on mobile device

Total Time: ~90 minutes


🚨 Potential Issues & Solutions

Issue 1: Domain Not Resolving

Symptoms: savemytime.bg doesn't load, shows error

Solutions:

  1. Check DNS propagation: https://dnschecker.org
  2. Verify A record points to 76.76.21.21
  3. Clear DNS cache: ipconfig /flushdns (Windows) or sudo dscacheutil -flushcache (Mac)
  4. Wait longer (up to 48 hours)
  5. Contact Super Hosting support

Issue 2: Email Not Received

Symptoms: Form submits but no email arrives

Solutions:

  1. Check Resend dashboard for delivery status
  2. Check spam folder
  3. Verify API key is correct in Vercel
  4. Check Supabase Edge Function logs
  5. Test with different email address
  6. Verify MX records: dig savemytime.bg MX +short

Issue 3: SSL Certificate Not Generating

Symptoms: HTTPS not working, certificate warning

Solutions:

  1. Wait 15 minutes after domain verification
  2. Go to Vercel → Settings → Domains → Refresh SSL
  3. Ensure domain is properly verified
  4. Contact Vercel support if persists

Issue 4: Email Goes to Spam

Symptoms: Emails delivered but in spam folder

Solutions:

  1. Verify Resend domain (add DKIM records)
  2. Add SPF record to Super Hosting DNS
  3. Ask recipient to mark as "Not Spam"
  4. Contact Hostinger to whitelist sender IP
  5. Consider using full domain verification with Resend

Issue 5: Phone Number Link Not Working on Mobile

Symptoms: Clicking phone doesn't open dialer

Solutions:

  1. Verify tel: link format is correct: tel:+359875354887
  2. Test on different mobile browsers
  3. Check for JavaScript errors
  4. Ensure no CSS preventing click

📞 Support Contacts

Vercel Support

Super Hosting Support

  • Website: [Super Hosting website]
  • Email: [Support email]
  • Phone: [Support phone]

Hostinger Support

Resend Support


🎯 Success Criteria

Domain Connection Success:

✅ savemytime.bg loads the website ✅ www.savemytime.bg works ✅ HTTPS with valid SSL certificate ✅ No redirect loops or errors

Email Setup Success:

✅ Contact form submissions arrive at info@savemytime.bg ✅ Email contains all form data ✅ Reply-to works correctly ✅ Emails don't go to spam

Content Update Success:

✅ Phone number shows: 0875 354 887 ✅ Tel link format: +359875354887 ✅ Email shows: info@savemytime.bg ✅ All references to old domain/email updated

Overall Success:

✅ Website accessible at custom domain ✅ Contact form fully functional ✅ Email notifications working ✅ All contact information updated ✅ No broken links or errors


⏱️ Timeline

Immediate (Today):

  • Create Resend account
  • Add Vercel domain
  • Update Super Hosting DNS

Day 1-2:

  • DNS propagation
  • SSL certificate generation
  • Test domain access

Day 2-3:

  • Implement email sending
  • Deploy Edge Function
  • Test email delivery

Day 3:

  • Update all content
  • Final testing
  • Go live

Total: 3-4 days for complete setup and verification


📚 Additional Resources

DNS Management:

Email Deliverability:

Monitoring:


This plan provides a complete, step-by-step guide to connect the domain, set up email delivery, and update all content. Ready to execute! 🚀