userName = $userName; $this->overdueItems = $overdueItems; $this->tomorrowItems = $tomorrowItems; $this->accountBalances = $accountBalances; $this->totalAvailable = $totalAvailable; $this->totalDue = $totalDue; $this->shortage = $shortage; $this->payableItems = $payableItems; $this->unpayableItems = $unpayableItems; $this->transferSuggestions = $transferSuggestions; $this->currency = $currency; } /** * Get the message envelope. */ public function envelope(): Envelope { $subject = $this->shortage > 0 ? '⚠️ Alerta: Pagamentos Vencidos - Saldo Insuficiente' : '📋 Lembrete: Pagamentos Pendentes'; return new Envelope( from: new Address('no-reply@cnxifly.com', 'WEBMoney - ConneXiFly'), replyTo: [ new Address('support@cnxifly.com', 'Soporte WEBMoney'), ], subject: $subject, tags: ['due-payments', 'alert'], metadata: [ 'total_due' => $this->totalDue, 'shortage' => $this->shortage, ], ); } /** * Get the message content definition. */ public function content(): Content { return new Content( view: 'emails.due-payments-alert', text: 'emails.due-payments-alert-text', with: [ 'userName' => $this->userName, 'overdueItems' => $this->overdueItems, 'tomorrowItems' => $this->tomorrowItems, 'accountBalances' => $this->accountBalances, 'totalAvailable' => $this->totalAvailable, 'totalDue' => $this->totalDue, 'shortage' => $this->shortage, 'payableItems' => $this->payableItems, 'unpayableItems' => $this->unpayableItems, 'transferSuggestions' => $this->transferSuggestions, 'currency' => $this->currency, ], ); } /** * Extra headers to help deliverability. */ public function headers(): Headers { return new Headers( text: [ 'X-Mailer' => 'WEBMoney/1.44.5', 'X-Priority' => '3', 'X-Auto-Response-Suppress' => 'OOF, AutoReply', 'Precedence' => 'bulk', 'List-Unsubscribe' => ', ', 'List-Unsubscribe-Post' => 'List-Unsubscribe=One-Click', ], ); } /** * Get the attachments for the message. */ public function attachments(): array { return []; } }