(()=>{var e={};e.id=211,e.ids=[211],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:e=>{"use strict";e.exports=require("child_process")},55511:e=>{"use strict";e.exports=require("crypto")},14985:e=>{"use strict";e.exports=require("dns")},94735:e=>{"use strict";e.exports=require("events")},29021:e=>{"use strict";e.exports=require("fs")},81630:e=>{"use strict";e.exports=require("http")},55591:e=>{"use strict";e.exports=require("https")},91645:e=>{"use strict";e.exports=require("net")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},27910:e=>{"use strict";e.exports=require("stream")},34631:e=>{"use strict";e.exports=require("tls")},79551:e=>{"use strict";e.exports=require("url")},28354:e=>{"use strict";e.exports=require("util")},74075:e=>{"use strict";e.exports=require("zlib")},18692:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>d,serverHooks:()=>m,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>g});var s={};t.r(s),t.d(s,{POST:()=>c});var o=t(42706),i=t(28203),u=t(45994),n=t(39187),a=t(98721);let p=()=>(0,a.oO)({host:"smtp.gmail.com",port:465,secure:!0,auth:{user:"loveisabc2025@gmail.com",pass:"yigw reje aysg wzmz"}});async function c(e){try{let{name:r,email:t,amount:s,currency:o,message:i,sessionId:u}=await e.json();if(console.log(r,t,s,o,i,u),!r||!t||!s||!o||!u)return n.NextResponse.json({error:"Missing required fields"},{status:400});let a=p();return await a.verify(),await a.sendMail({from:'"Adaeze & Bolaji" <loveisabc2025@gmail.com>',to:t,subject:"Thank You for Your Wedding Gift",html:`
        <h1>Dear ${r},</h1>
        <p>Thank you so much for your generous gift of ${o} ${s}. Your support means the world to us as we begin our journey together.</p>
        <p>We are truly blessed to have friends like you in our lives.</p>
        <p>With love,<br>Adaeze & Bolaji</p>
      `}),await a.sendMail({from:'"Wedding Gift Notification" <loveisabc2025@gmail.com>',to:"odafe41@gmail.com",subject:"New Wedding Gift Received",html:`
        <h1>New Gift Received!</h1>
        <p><strong>From:</strong> ${r} (${t})</p>
        <p><strong>Amount:</strong> ${o} ${s}</p>
        ${i?`<p><strong>Message:</strong> ${i}</p>`:""}
        <p><strong>Stripe Session ID:</strong> ${u}</p>
      `}),n.NextResponse.json({success:!0})}catch(r){console.error("Error sending emails:",r);let e=r instanceof Error?r.message:"Unknown error";return n.NextResponse.json({error:"Error sending emails",details:e},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/send-gift-emails/route",pathname:"/api/send-gift-emails",filename:"route",bundlePath:"app/api/send-gift-emails/route"},resolvedPagePath:"C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\api\\send-gift-emails\\route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:g,serverHooks:m}=d;function x(){return(0,u.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:g})}},96487:()=>{},78335:()=>{}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,721],()=>t(18692));module.exports=s})();