# Mail Log reference

<!-- prettier-ignore-start -->

Developer reference for `capell-app/mail-log`. Start with the [README](../README.md) for what the extension does and how to install it.

## Package Details

Mail Log is an **Available** Capell package in the **Capell Operations** product group. It ships as `capell-app/mail-log` and extends these surfaces: admin.

- Status: Available
- Tier: free
- Bundle: operations
- Composer package: `capell-app/mail-log`
- Namespace: `Capell\MailLog`
- Theme key: not applicable

## Technical Shape

### Service providers

- `Capell\MailLog\Providers\MigrationMetadataServiceProvider`
- `Capell\MailLog\Providers\MailLogServiceProvider`
- `Capell\MailLog\Providers\AdminServiceProvider`

### Config files

- `packages/mail-log/config/mail-log.php`

### Migrations

- `packages/mail-log/database/migrations/2026_11_22_000001_create_mail_log_tables.php`
- `packages/mail-log/database/migrations/2026_11_23_000001_create_outbound_message_sources_table.php`
- `packages/mail-log/database/migrations/2026_11_23_000002_create_outbound_message_breaker_tables.php`
- `packages/mail-log/database/migrations/2026_11_23_000100_add_provider_events_and_suppressions.php`
- `packages/mail-log/database/migrations/2026_11_24_000001_add_fallback_columns_to_mail_log_entries.php`
- `packages/mail-log/database/migrations/2026_11_24_000100_add_source_health_monitoring.php`
- `packages/mail-log/database/migrations/2026_11_25_000001_add_recipient_hashes_to_held_messages.php`

### Settings migrations

- `packages/mail-log/database/settings/2026_11_22_000002_add_mail_log_settings.php`

### Settings classes

- `MailLogSettings`

### Models

- `MailLogEntry`
- `MailLogRecipient`
- `MailSuppression`
- `OutboundHeldMessage`
- `OutboundMessageBreaker`
- `OutboundMessageSource`

### Filament classes

- `SpamComplaintsPage`
- `MailLogEntryResource`
- `ListMailLogEntries`
- `ViewMailLogEntry`
- `MailLogEntryInfolist`
- `MailLogEntriesTable`
- `OutboundHeldMessageResource`
- `ListOutboundHeldMessages`
- `OutboundMessageSourceResource`
- `ListOutboundMessageSources`
- `MailLogSettingsSchema`

### Route files

- `packages/mail-log/routes/webhooks.php`

### Policies

- `MailLogEntryPolicy`
- `OutboundHeldMessagePolicy`
- `OutboundMessageSourcePolicy`

### Extension contracts

- `RecipientSuppressionList`

### Listeners

- `ApplyEngagementTrackingListener`
- `CaptureOutboundNotificationListener`
- `CloseUnconfirmedMailListener`
- `RecordSendingMailListener`
- `RecordSentMailListener`
- `SkipSuppressedRecipientsListener`

### Actions

- `AlertAdminsOfHeldOutboundMessagesAction`
- `ApplyMailProviderEventAction`
- `ApplyPostmarkMailEventAction`
- `BuildMailHealthDigestAction`
- `BuildMailLogPrivacyExportAction`
- `BuildOutboundMessageHealthAction`
- `CaptureOutboundMessageAction`
- `DiscardHeldOutboundMessagesAction`
- `EraseMailLogPrivacyDataAction`
- `EvaluateOutboundMessageHealthAction`
- `MarkMailSentAction`
- `MarkOutboundMessageSourceReviewedAction`
- `MarkUnconfirmedMailFailedAction`
- `NotifyAdminsOfNewOutboundMessageAction`
- `NotifyAdminsOfSourceHealthAction`
- `PurgeMailLogAction`
- `RecordMailFallbackAction`
- `RecordOutgoingMailAction`
- `ReleaseHeldOutboundMessagesAction`
- `RenderMailHealthDigestSectionAction`
- `ResolveMailLogSettingsAction`
- `ResolveMailLogSubjectHashesAction`
- `ResolveOutboundMessageSourceAction`
- `SetOutboundMessageBreakerAction`
- `SetOutboundMessageSourceEngagementAction`
- `SetOutboundMessageSourceHealthThresholdsAction`
- `SuppressMailRecipientsAction`
- `SyncOutboundMessageCatalogueAction`
- `UpdateOutboundMessageBaselinesAction`

### Data objects

- `MailHealthDigestData`
- `MailLogPurgeResultData`
- `MailLogSettingsData`
- `MailProviderEventData`
- `OutboundMessageSourceHealthData`
- `PostmarkMailEventData`

### Command signatures

- `capell:mail-log-breaker-baselines`
- `capell:mail-log-discover`
- `capell:mail-log-health`
- `capell:mail-log-prune`

### Manifest action API

- `alertAdminsOfHeldOutboundMessages: Capell\MailLog\Actions\AlertAdminsOfHeldOutboundMessagesAction`
- `applyMailProviderEvent: Capell\MailLog\Actions\ApplyMailProviderEventAction`
- `applyPostmarkMailEvent: Capell\MailLog\Actions\ApplyPostmarkMailEventAction`
- `buildMailHealthDigest: Capell\MailLog\Actions\BuildMailHealthDigestAction`
- `buildMailLogPrivacyExport: Capell\MailLog\Actions\BuildMailLogPrivacyExportAction`
- `buildOutboundMessageHealth: Capell\MailLog\Actions\BuildOutboundMessageHealthAction`
- `captureOutboundMessage: Capell\MailLog\Actions\CaptureOutboundMessageAction`
- `discardHeldOutboundMessages: Capell\MailLog\Actions\DiscardHeldOutboundMessagesAction`
- `eraseMailLogPrivacyData: Capell\MailLog\Actions\EraseMailLogPrivacyDataAction`
- `evaluateOutboundMessageHealth: Capell\MailLog\Actions\EvaluateOutboundMessageHealthAction`
- `markMailSent: Capell\MailLog\Actions\MarkMailSentAction`
- `markOutboundMessageSourceReviewed: Capell\MailLog\Actions\MarkOutboundMessageSourceReviewedAction`
- `markUnconfirmedMailFailed: Capell\MailLog\Actions\MarkUnconfirmedMailFailedAction`
- `notifyAdminsOfNewOutboundMessage: Capell\MailLog\Actions\NotifyAdminsOfNewOutboundMessageAction`
- `notifyAdminsOfSourceHealth: Capell\MailLog\Actions\NotifyAdminsOfSourceHealthAction`
- `purgeMailLog: Capell\MailLog\Actions\PurgeMailLogAction`
- `recordOutgoingMail: Capell\MailLog\Actions\RecordOutgoingMailAction`
- `releaseHeldOutboundMessages: Capell\MailLog\Actions\ReleaseHeldOutboundMessagesAction`
- `renderMailHealthDigestSection: Capell\MailLog\Actions\RenderMailHealthDigestSectionAction`
- `resolveMailLogSettings: Capell\MailLog\Actions\ResolveMailLogSettingsAction`
- `resolveMailLogSubjectHashes: Capell\MailLog\Actions\ResolveMailLogSubjectHashesAction`
- `resolveOutboundMessageSource: Capell\MailLog\Actions\ResolveOutboundMessageSourceAction`
- `setOutboundMessageBreaker: Capell\MailLog\Actions\SetOutboundMessageBreakerAction`
- `setOutboundMessageSourceEngagement: Capell\MailLog\Actions\SetOutboundMessageSourceEngagementAction`
- `setOutboundMessageSourceHealthThresholds: Capell\MailLog\Actions\SetOutboundMessageSourceHealthThresholdsAction`
- `suppressMailRecipients: Capell\MailLog\Actions\SuppressMailRecipientsAction`
- `syncOutboundMessageCatalogue: Capell\MailLog\Actions\SyncOutboundMessageCatalogueAction`
- `updateOutboundMessageBaselines: Capell\MailLog\Actions\UpdateOutboundMessageBaselinesAction`

### Scheduled commands

- `capell:mail-log-breaker-baselines (hourly; package registered)`
- `capell:mail-log-discover (daily; package registered)`
- `capell:mail-log-health (hourly; package registered)`
- `capell:mail-log-prune (daily; package registered)`

### Console command classes

- `DiscoverOutboundMessagesCommand`
- `EvaluateOutboundMessageHealthCommand`
- `PruneMailLogCommand`
- `UpdateOutboundMessageBaselinesCommand`

### Manifest contributions

- `admin-page: Capell\MailLog\Manifest\MailLogAdminPageContribution`
- `admin-resource: Capell\MailLog\Manifest\MailLogAdminResourcesContribution`
- `console-command: Capell\MailLog\Manifest\MailLogConsoleCommandsContribution`
- `health-check: Capell\MailLog\Manifest\MailLogHealthContribution`
- `model: Capell\MailLog\Manifest\MailLogModelsContribution`
- `permission: Capell\MailLog\Manifest\MailLogPermissionsContribution`
- `route: Capell\MailLog\Manifest\MailLogRoutesContribution`
- `scheduled-job: Capell\MailLog\Manifest\MailLogBreakerBaselineScheduleContribution`
- `scheduled-job: Capell\MailLog\Manifest\MailLogDiscoverScheduleContribution`
- `scheduled-job: Capell\MailLog\Manifest\MailLogHealthScheduleContribution`
- `scheduled-job: Capell\MailLog\Manifest\MailLogPurgeScheduleContribution`
- `setting: Capell\MailLog\Manifest\MailLogSettingsContribution`

### Health checks

- `Capell\MailLog\Health\MailLogHealthCheck`

### Blade views

- `packages/mail-log/resources/views/digest/section.blade.php`

## Data Model

- Required tables: `mail_log_entries`, `mail_log_recipients`, `outbound_message_sources`, `outbound_held_messages`, `outbound_message_breakers`, `mail_log_suppressions`.
- Models: `MailLogEntry`, `MailLogRecipient`, `MailSuppression`, `OutboundHeldMessage`, `OutboundMessageBreaker`, `OutboundMessageSource`.
- Migration files: `2026_11_22_000001_create_mail_log_tables.php`, `2026_11_23_000001_create_outbound_message_sources_table.php`, `2026_11_23_000002_create_outbound_message_breaker_tables.php`, `2026_11_23_000100_add_provider_events_and_suppressions.php`, `2026_11_24_000001_add_fallback_columns_to_mail_log_entries.php`, `2026_11_24_000100_add_source_health_monitoring.php`, `2026_11_25_000001_add_recipient_hashes_to_held_messages.php`.
- Migration impact: run host migrations through the package install flow before opening package surfaces.
- Deletion/retention behaviour: migrations declare cascade-on-delete relationships; retention is scheduled through `capell:mail-log-prune` (daily; registered by the package provider).

<!-- prettier-ignore-end -->