From 805cca0b526a033f4524b45d913d5a72c7a78066 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 23 Dec 2025 01:07:47 -0500 Subject: [PATCH] Use newsletter-api for immediate welcome emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switches from direct Listmonk API to newsletter-api endpoint which handles subscription + sends welcome email immediately. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- components/newsletter-signup.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/newsletter-signup.tsx b/components/newsletter-signup.tsx index 3e97ec3..dfc0f96 100644 --- a/components/newsletter-signup.tsx +++ b/components/newsletter-signup.tsx @@ -3,7 +3,7 @@ import { useState } from "react" import { Button } from "@/components/ui/button" -const LISTMONK_URL = "https://newsletter.jeffemmett.com" +const NEWSLETTER_API = "https://newsletter.jeffemmett.com/api/subscribe" const LIST_UUID = "fc27ffbd-400c-436b-ae23-2aa2776d8010" // Compost Capitalism list export function NewsletterSignup() { @@ -19,21 +19,20 @@ export function NewsletterSignup() { setStatus("loading") try { - const response = await fetch(`${LISTMONK_URL}/subscription/form`, { + const response = await fetch(`${NEWSLETTER_API}/subscribe`, { method: "POST", headers: { - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/json", }, - body: new URLSearchParams({ + body: JSON.stringify({ email: email, - list: LIST_UUID, - name: "", + list_uuid: LIST_UUID, }), }) if (response.ok) { setStatus("success") - setMessage("Check your email to confirm your subscription!") + setMessage("Welcome to the heap. Decomposition takes time.") setEmail("") } else { throw new Error("Subscription failed")