-
New Catering Inquiry
-
Name: ${rawFormData.name}
-
Email: ${rawFormData.email}
-
Phone: ${rawFormData.phone}
-
Event Type: ${rawFormData.eventType}
-
Event Date: ${rawFormData.date}
-
Number of Guests: ${rawFormData.guests}
-
-
Message:
-
${rawFormData.message || 'No special requests provided.'}
-
+ const emailData = {
+ name: rawFormData.name,
+ email: rawFormData.email,
+ phone: rawFormData.phone,
+ subject: `Catering Inquiry: ${rawFormData.eventType} - ${rawFormData.name}`,
+ message: `
+
+
New Catering Inquiry
+
Name: ${rawFormData.name}
+
Email: ${rawFormData.email}
+
Phone: ${rawFormData.phone}
+
Event Type: ${rawFormData.eventType}
+
Event Date: ${rawFormData.date}
+
Number of Guests: ${rawFormData.guests}
+
+
Message:
+
${rawFormData.message || 'No special requests provided.'}
- `,
- });
+
+ `,
+ to: 'hello@antalyarestaurant.ca',
+ senderName: "Antalya Restaurant - Catering Inquiry",
+ };
+ try {
+ await axios.post(
+ "https://mailserver.metatronnest.com/send",
+ emailData,
+ { headers: { "Content-Type": "application/json" } }
+ );
return { success: true, message: 'Your catering inquiry has been submitted successfully to hello@antalyarestaurant.ca!' };
} catch (error) {
- console.error('Failed to send catering inquiry email:', error);
+ console.error('Failed to send catering inquiry:', error);
return { success: false, message: 'There was an error sending your inquiry. Please try again or email us directly.' };
}
}