xenoplexus/statamic-newsletter
Composer 安装命令:
composer require xenoplexus/statamic-newsletter
包简介
Newsletter management addon for Statamic — subscribe/unsubscribe, Postmark integration, queued batch sending.
README 文档
README
A Statamic addon for managing newsletters with Postmark integration. Subscribe/unsubscribe handling, welcome emails, queued batch sending, and suppression webhook support.
Features
- Subscribe/unsubscribe with signed URL verification
- Welcome email sent automatically on subscribe
- Batch sending via Postmark with configurable batch sizes and queued jobs
- Publish-to-send workflow — publishing a newsletter entry in the CP dispatches it to all active subscribers
- Postmark suppression webhook automatically deactivates bounced/complained addresses
- Antlers
{{ newsletter_form }}tag for embedding subscribe forms in any template - CLI preview with
php artisan newsletter:preview(supports--demofor placeholder content) - Fully configurable via env variables — org info, Postmark credentials, DB connection, route prefixes
- Publishable templates for per-project email customization
Requirements
- PHP 8.3+
- Statamic 6 / Laravel 12
- Postmark account (for sending)
Installation
composer require xenoplexus/statamic-newsletter php please newsletter:install php artisan migrate
The install command copies the newsletter collection, blueprint, and unsubscribe page into your project.
Configuration
Add these to your .env:
# Required POSTMARK_TOKEN=your-postmark-server-token POSTMARK_WEBHOOK_TOKEN=your-webhook-auth-token # Organization NEWSLETTER_ORG_NAME="Your Organization" NEWSLETTER_ORG_URL=https://example.com NEWSLETTER_ORG_EMAIL=info@example.com NEWSLETTER_ORG_ADDRESS="123 Main St, City, ST 12345" # Email NEWSLETTER_FROM_ADDRESS=info@example.com NEWSLETTER_REPLY_TO=info@example.com NEWSLETTER_NOREPLY_ADDRESS=no-reply@example.com NEWSLETTER_WELCOME_SUBJECT="Welcome to our newsletter!" # Optional NEWSLETTER_ORG_TAGLINE="Your tagline here" NEWSLETTER_ORG_COPYRIGHT="© 2025 Your Org. All rights reserved." NEWSLETTER_BANNER_IMAGE=/assets/images/banner.jpg NEWSLETTER_TAG=newsletter NEWSLETTER_WELCOME_TAG=welcome NEWSLETTER_BATCH_SIZE=50 NEWSLETTER_DB_CONNECTION=mysql NEWSLETTER_DB_TABLE=newsletter_subscribers
Publish the full config to customize further:
php artisan vendor:publish --tag=statamic-newsletter-config
Usage
Subscribe form
Use the Antlers tag in any template:
{{ newsletter_form }}
Or build your own form that POSTs to /{prefix}/subscribe with an email field.
Sending newsletters
- Create a newsletter entry in the CP using the
newsletterscollection - Add an intro heading, optional intro body, and content sections
- Publish the entry — it automatically dispatches to all active subscribers
To resend: unpublish, set newsletter_send_count to 0, clear newsletter_sent_at, then republish.
Preview
php artisan newsletter:preview # Pick from existing entries php artisan newsletter:preview my-slug # Preview a specific entry php artisan newsletter:preview --demo # Preview with placeholder content
Customizing email templates
php artisan vendor:publish --tag=statamic-newsletter-views
Templates are published to resources/views/vendor/statamic-newsletter/ for editing.
Webhook
Set up a Postmark suppression webhook pointing to:
https://yoursite.com/webhook/postmark/suppression
Include the X-Webhook-Token header matching your POSTMARK_WEBHOOK_TOKEN env var.
License
MIT
xenoplexus/statamic-newsletter 适用场景与选型建议
xenoplexus/statamic-newsletter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「newsletter」 「email」 「postmark」 「statamic」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 xenoplexus/statamic-newsletter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 xenoplexus/statamic-newsletter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 xenoplexus/statamic-newsletter 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Library to send email across all platforms using one interface.
Provides an email provider for postmarkapp.com
A minor update of Miguel Perez's no-longer maintained code from https://github.com/miguel250/PostmarkBundle to allow for Symfony 3 compatibility. All credit/kudos/thanks for the work should obviously go to him
Manage newsletters in Laravel
Verify, normalize, and track email delivery webhooks from SendGrid, Postmark, Mailgun, Amazon SES, and Resend
Extensible library for building notifications and sending them via different delivery channels.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 39
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-17