BuiltEmail workspace

Customer quote contract

Implementation: App\Mail\quote. Source view: resources/views/emails/quote/quote.blade.php. Usage: app/Http/Controllers/General/emailsController.php:410, :414, :422 (sendquote). These static references are evidence, not proof of current production delivery. Shared original layout: mail::message; original optional message uses mail::promotion. The drafts use the existing design renderer's standalone table shell instead of nesting a full document inside Laravel Markdown wrappers.

Suggested subject: Quote #{{quote_number}} (existing)

Suggested preheader: Quote {{quote_number}} from {{business_name}}.

Portable placeholder contract

TokenExisting source / derivationHandling
{{logo_url}}Original Built app_name PNGOptional deployment override; concrete project HTTPS PNG is already present. Use approved absolute HTTPS or matching attached CID.
{{preheader}}Suggested copy above, assembled from existing contextRequired escaped text; no new application field or expiry.
{{business_name}}$current_business->name ($business constructor argument)Required escaped text. Preserve the source value.
{{quote_number}}$quote->quote_numberRequired escaped text. Preserve the source value.
{{issued_at}}$quote->created_at string as currently renderedRequired source issuing value; do not invent a date or timezone.
{{valid_until}}$quote->valid_untilRequired existing validity value; do not calculate a new expiry period. Resolve null source values explicitly before integration.
{{quote_amount}}$quote->fx_currency . number_format($quote->amount_due, 2)Required existing currency-prefixed display; do not substitute business base currency or reinterpret amount_due.
{{quote_url}}$quote->linkRequired server-generated complete HTTPS URL; validate approved host and path separately, then escape the attribute. Preserve signed/encrypted parameters. Button and fallback are the same source URL.
{{merchant_message}}$message constructor argument -> message view dataOptional escaped multiline text in the portable draft. Remove the entire marked table and matching text block when empty; see rich-text decision below.
{{invoice_color}}$quote->invoice_colorExisting dynamic brand field retained in this contract only. Deferred secondary styling; not used in this draft.

Content, states and integration decisions

Rich text, escaping and safe integration

Portable {{placeholder_name}} tokens are not automatically Laravel Blade syntax. Prefer a dedicated full Blade HTML view and text alternative mapped explicitly to the existing Mailable values. Use view()/text() as appropriate during later authorized integration; no new templating framework is required. Keep existing constructor data and PDF-only bindings even when the body does not duplicate them.

All dynamic values in the draft are escaped text, including multiline merchant content and numbered failure details. Preserve newline structure. For existing raw-HTML merchant messages, a deliberate adapter must either convert reviewed rich text to equivalent text, retaining paragraphs and meaningful URL destinations, or render a narrowly allowlisted sanitized rich-text section. Simple strip_tags is not sufficient to preserve anchor destinations. Do not treat untrusted text as raw HTML, remove instructions silently, or repeatedly substitute inserted strings. If portable string replacement is chosen, use one pass after escaping text and separately validating URL values.

Validate destinations against intended HTTPS hosts/paths and preserve complete existing links. Optional blocks must be removed as whole marked sections in both HTML and text, not left with blank headings or unresolved tokens. Button/fallback links share the same value where present; there are no additional legacy duplicate link fields in these four views. No button is invented for the manual reminder.

The concrete default logo is https://built-storage.ams3.cdn.digitaloceanspaces.com/Built/app_name.png. Retain assets/built-logo.png as the unchanged original. Use absolute HTTPS hosting or a real attachment with a matching CID for deployment; preserve the image aspect ratio. Remote images may be blocked. Native dark CSS is progressive enhancement and requires actual client testing.

Files and text alternatives

ready/quote.html and ready/quote.txt are standalone extracts. Each state has populated HTML and plain text under previews/. No separate project-owned plain-text alternative was found for these four Markdown views; the new .txt files are proposed equivalents. All preview identities and references are fictional; all application actions are inert local explanations. No email, form, booking, approval or payment is executed. See invoice-followups-batch.md and integration-notes.html for scope and shared requirements.