BuiltEmail workspace

Internal automatic subscription review contract

Implementation: App\Mail\FailedSubscription. Baseline view: resources/views/emails/users/automatic-subscription-failed.blade.php. Usage: app/Http/Repository/PaymentRepository.php:1020–1027, resolveMobileMoneyCollection(). Static references are evidence, not proof of current production delivery. Original templates use mail::message; the standalone draft uses the shared compact table shell.

Suggested subject: Automatic subscription needs review (proposed; source envelope subject is Failed Automatic Subscription). HTML document title does not set the actual mail header.

Suggested preheader: An automatic subscription collection has an undefined subscription type.

Portable placeholder contract

TokenExisting source / derivationHandling
{{logo_url}}Original Built app_name PNGOptional deployment override; concrete project HTTPS image is already present. Approved absolute HTTPS or matching CID.
{{preheader}}Suggested text above, assembled only from existing contextRequired escaped text; no new backend record or timing promise.
{{business_id}}$business->idRequired internal business reference; never a customer login token.
{{business_name}}$business->nameRequired escaped text; preserve the existing value.
{{collection_amount}}$collection->amountRequired raw source amount display. Source supplies no currency prefix in this view, so none is invented.
{{channel}}$collection->networkOptional source network display; explicit escaped em dash when absent. Do not guess channel from provider.
{{cycle_reference}}$collection->transaction_idRequired source value labeled Cycle in the original. This is a reference, not proof of months or a billing-cycle count; no field is discarded.

Content, states and integration decisions

Safe integration, text and images

ready/automatic-subscription-review.html and ready/automatic-subscription-review.txt are portable extracts; every populated state under previews/ has HTML and text. No separate project-owned plain-text alternative was found for these four views, so the supplied text versions are proposed equivalents.

Portable {{placeholder_name}} tokens are not automatically Laravel Blade variables. Prefer an explicitly mapped full Blade view and a separate text alternative inside the existing Mailable, retaining constructors, sender/header choices, recipient routing, attachments and queue behavior. A full document should not be nested inside mail::message. No new templating framework is needed.

Escape all dynamic text, attribute values, failure reasons and internal references. Never insert provider text as raw HTML. Validate any image override separately against approved HTTPS hosts or an actual attached CID before escaping it. If string replacement is chosen, use one pass; inserted token-shaped text must remain text. There are no application action destinations or duplicate legacy action-link fields in this batch; the source failed-attempt button is empty and intentionally removed. Only the confirmation tax block is conditional; remove its entire marked section when false in both HTML/text. Other documented fields are required except the explicit channel fallback.

Default logo: https://built-storage.ams3.cdn.digitaloceanspaces.com/Built/app_name.png. Retain the unchanged assets/built-logo.png original. Use absolute HTTPS hosting or a matching CID attachment, preserve its proportions and account for remote-image blocking. Dark mode is progressive enhancement and needs real client tests.

Fixtures use fictional names, amounts, reasons and references. No payment, subscription change, mail send or provider action is executed. Browser rendering is not proof of Gmail, Outlook or iOS Mail compatibility, actual attachment generation or production delivery. See subscriptions-batch.md, subscriptions-validation.md and integration-notes.html.