import nodemailer from "nodemailer" // Lazy-initialized SMTP transport (Mailcow) let transporter: nodemailer.Transporter | null = null function getTransporter() { if (!transporter && process.env.SMTP_PASS) { transporter = nodemailer.createTransport({ host: process.env.SMTP_HOST || "mail.rmail.online", port: parseInt(process.env.SMTP_PORT || "587"), secure: false, auth: { user: process.env.SMTP_USER || "newsletter@cryptocommonsgather.ing", pass: process.env.SMTP_PASS, }, tls: { rejectUnauthorized: false }, }) } return transporter } const EMAIL_FROM = process.env.EMAIL_FROM || "Crypto Commons Gathering " interface PaymentConfirmationData { name: string email: string amountPaid: string paymentMethod: string contributions: string dietary: string } export async function sendPaymentConfirmation( data: PaymentConfirmationData ): Promise { const transport = getTransporter() if (!transport) { console.log("[Email] SMTP not configured, skipping confirmation email") return false } const html = `

You're In!

Crypto Commons Gathering 2026

Dear ${data.name},

Your payment of ${data.amountPaid} has been confirmed. You are now registered for Crypto Commons Gathering 2026 in Austria's Höllental Valley, August 16–23, 2026.

Registration Details

${data.dietary ? `` : ""}
Amount: ${data.amountPaid}
Payment: ${data.paymentMethod}
Dietary:${data.dietary}

Food & Accommodation

We'll follow up separately via email with food options and pricing. If you haven't yet decided on accommodation, there's still time! The Commons Hub (our main venue with 30 on-site beds) and the nearby Herrnhof Villa are the most convenient options — right in the heart of the gathering. Other nearby options are also available; check the Directions page for details.

What's Next?

  • Join the CCG26 Telegram group to connect with other participants
  • Start preparing your session proposals
  • We'll follow up with you via email in the coming weeks with further details on logistics, schedule, and how to make the most of your time in the valley

See you in the valley,
The Crypto Commons Gathering Team


You received this email because you registered at cryptocommonsgather.ing.
cryptocommonsgather.ing

` try { const info = await transport.sendMail({ from: EMAIL_FROM, to: data.email, subject: "Registration Confirmed - Crypto Commons Gathering 2026", html, }) console.log( `[Email] Payment confirmation sent to ${data.email} (${info.messageId})` ) return true } catch (error) { console.error("[Email] Failed to send payment confirmation:", error) return false } }