release: dev → main (email pipeline refactor + forwarding, placeholders, tracking, attachments)#378
Conversation
* UserPersonalizer in CampaignProcessorMessageHandler * HtmlToText * MessageDataLoader * TextParser * RemotePageFetcher * Use repo methods * Use MessagePrecacheDto * Refactor * Todo * SystemMailConstructor * EmailBuilder * InjectedByHeaderSubscriber * TemplateImageManager * ExternalImageCacher * TemplateImageEmbedder * Mailer * RemotePageFetcherTest * TextParserTest * MessageDataLoaderTest * MessageDataLoaderTest * Test fix * Fix: phpmd * Fix: phpcs * After review 0 * After review 1 * Add tests * EmailBuilderTest * update coderabbit.yaml * Add tests * MailSizeChecker * Feat/email building with attachments (#375) New Features PDF generation for messages, per-subscriber remote-content fetching, tracking-pixel user tracking, and richer attachment handling with downloadable copies. Improvements Unified email builder flow with consistent composition and multi-format output (HTML/Text/PDF); expanded, context-aware placeholder personalization (many URL/list resolvers); improved remote-content precaching and output formatting; new configurable parameters and translations. --------- Co-authored-by: Tatevik <tatevikg1@gmail.com> * Feat: email forwarding (#377) - Message forwarding: send campaigns to friends (optional personal note), per-user limits, admin notifications on success/failure, and forwarding statistics; forwarded messages prefixed "Fwd". - Admin-copy emails: configurable toggle to send admin copies and select recipients. --------- Co-authored-by: Tatevik <tatevikg1@gmail.com> * Cutoff from forward_email_period config * ForwardingResult * Remove MessageFormat consts * Testing bundle * After review 3 * MessageDataLoader types * Fix HTMLPurifier_Config --------- Co-authored-by: Tatevik <tatevikg1@gmail.com>
New Features
Attachment download service that validates access, resolves files, detects MIME types, and returns downloadable content.
Lightweight downloadable attachment DTO and a new exception for missing attachment files.
Public constant to mark forwarded attachments.
Bug Fixes
Attachment download links now use a path-based format with encoded UID.
|
Important Review skippedToo many files! This PR contains 290 files, which is 140 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (290)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
New Features
Message view tracking: records when subscribers view messages and captures metadata (IP, User-Agent, referer).
Enhancements
Quick actions to mark messages as viewed and to check viewed status.
Message view counters now increment when viewed.
Refactor
Repository lookup renamed for consistency and callers updated.
Chores
Switched REST API parameter to a base URL and updated tracking image path.
Refactor
Recipient addresses are now passed explicitly throughout the email pipeline for clearer, more reliable message construction and handling.
Subscriber creation now requires an email at instantiation, enforcing consistent initialization.
Bug Fixes
Admin notification filtering relaxed so system notifications are handled more consistently even when recipient info is missing.
|
@coderabbitai please add a summary of this pull request:
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 35008
🗂️ PR Summary — Key Changes📧 Email Building Pipeline (Refactor + New Features)
📤 Message Forwarding (
|
5c05af3 to
057f89f
Compare
|
@coderabbitai summarize |
|
✅ Actions performedSummary regeneration triggered. |
PR Summary — Key Changes
📧 Email Building Pipeline (Refactor + New Features)
BaseEmailBuilder,EmailBuilder,ForwardEmailBuilder, andSystemEmailBuilder, alongsideCampaignMailContentBuilderandSystemMailContentBuilderfor consistent HTML/Text/PDF output composition.InjectedByHeaderSubscriberandHttpReceivedStampBuilderfor richer email header management.MailSizeCheckerto validate email size before dispatch.📤 Message Forwarding (
#374,#377)MessageForwardService,ForwardDeliveryService,ForwardContentService,ForwardingGuard, andForwardingStatsServiceto support sending campaigns to friends with optional personal notes.ForwardLimitExceededException), admin notifications on success/failure, and forwarded messages are prefixed with "Fwd".UserMessageForwardRepositoryandUserMessageForwardManageradded for persistence.📎 Attachment Download Service (
#379)AttachmentDownloadServicethat validates access, resolves files, detects MIME types, and returns downloadable content.DownloadableAttachmentDTO andAttachmentFileNotFoundException.👁️ Message Open Tracking (
#380)UserMessageServiceto record when subscribers view messages, capturing metadata (IP, User-Agent, referrer).🔤 Placeholder System (Major Expansion)
MessagePlaceholderProcessorand a full suite of per-context value resolvers underService/Placeholder/, covering: unsubscribe, subscribe, forward, blacklist, confirmation, contact, footer, jumpoff, preferences, signature, lists, and user-tracking URLs.PlaceholderContextDTO introduced for richer, context-aware personalization.PlaceholderResolverrefactored to support the new resolver interfaces.📄 PDF & Remote Content
PdfGeneratoradded for per-message PDF generation.RemotePageFetcheradded for per-subscriber remote-content fetching with caching (OnceCacheGuard).ExternalImageServiceandHtmlUrlRewriteradded for external image handling and URL rewriting.🔔 Admin Copy Emails & Notifications
AdminCopyEmailSenderandAdminNotifierservices; configurable toggle to send admin copies and select recipients.📋 Subscriber Filtering & Pagination
SubscriberFilterexpanded with new filter options.getFilteredAfterIdquery fixed frominnerJoin→leftJoin.PaginatedResultmodel;CursorPaginationTraitandPaginatableRepositoryInterfaceimproved.getSubscriberDetailsmethod.🔧 Refactors & Fixes
MessagePrecacheDtorefactored — recipienttoaddress removed from DTO, now passed explicitly through the pipeline.Subscribermodel now requires email at instantiation.Manager/namespace).HTMLPurifier_Configfix applied.MessageFormatconstants removed.📦 Dependencies & Configuration
parameters.yml.dist.messages.en.xlf.PhpListCoreExtensionDI extension class added..coderabbit.yamlupdated.Version20260204094237.Thanks for contributing to phpList!