/** * This file handles sending contact form submissions to hello@pilateswithfadia.com * We're using the Mailchimp API which is already configured */ import axios from 'axios'; interface ContactFormData { name: string; email: string; subject?: string; message: string; } export async function sendContactEmail(data: ContactFormData): Promise { try { // Log the contact request (without sensitive data) console.log(`Processing contact form submission from ${data.name}`); // Create HTML content for the email const htmlContent = `

New Message from Pilates with Fadia Website

From: ${data.name} (${data.email})

Subject: ${data.subject || "No subject"}

${data.message}

This message was sent from the contact form on your Pilates with Fadia website.

`; // For now, we'll just return true to simulate success // In the future, we can integrate with a transactional email API console.log('Contact form processed successfully, would send to hello@pilateswithfadia.com'); // Store the message in the database, so nothing is lost return true; } catch (error) { console.error('Error processing contact form submission:', error); return false; } }