import { NextResponse } from 'next/server'; import axios from 'axios'; export async function POST(request: Request) { try { const body = await request.json(); const res = await axios.post( "https://mailserver.metatronnest.com/send", body, { headers: { "Content-Type": "application/json" } } ); return NextResponse.json({ success: true, data: res.data }); } catch (error: any) { console.error("Email send error:", error.message); return NextResponse.json( { success: false, error: error.message }, { status: 500 } ); } }