Email Marketing
Send admin-composed email campaigns to a segment of your businesses — category/city/type targeting, chunked Resend delivery, CAN-SPAM footer and one-click unsubscribe.
Why this matters
Once you've seeded a directory of businesses, their email addresses are an asset. Email marketing lets you compose a campaign in the admin and send it to a targeted segment — new-feature announcements, "claim your listing" nudges, local offers — without leaving the platform or wiring up a separate ESP.
Turn it on
Migration: 0011_add_email_campaigns.sql (campaigns + per-recipient delivery tracking). Included in APPLY_LOCAL_BUSINESS.sql.
Sender: delivery uses Resend — set RESEND_API_KEY and a verified from-address (RESEND_PRODUCTION_FROM). See Email Config.
Postal address (required for compliance): set BUSINESS_POSTAL_ADDRESS in your env. It's rendered into the CAN-SPAM footer of every campaign.
# .env.local
RESEND_API_KEY=re_...
RESEND_PRODUCTION_FROM=Your Name <hello@yourdomain.com>
BUSINESS_POSTAL_ADDRESS=123 Example St, City, CountryHow it works
- Open the admin Email Marketing composer.
- Build a segment of businesses with an email, filtered by category, city and/or type.
- Write the campaign and send. Delivery is chunked through a raw-HTML Resend sender so large sends don't hit rate limits.
- Every email carries a CAN-SPAM footer and a one-click unsubscribe link; unsubscribes are suppressed from future sends (
/api/email/unsubscribe).
The composer shows KPIs — campaigns, total sent, delivery rate and recipients — plus per-campaign delivery tracking.
Campaigns go to businesses in your own directory. Keep sends relevant (claim nudges, local offers, product news), honour unsubscribes, and make sure BUSINESS_POSTAL_ADDRESS is set so the footer is compliant. Unexpected bulk email hurts your domain reputation and can breach anti-spam law.