Download the PHP package datascaled/laravel-m365-mailer without Composer
On this page you can find all versions of the php package datascaled/laravel-m365-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download datascaled/laravel-m365-mailer
More information about datascaled/laravel-m365-mailer
Files in datascaled/laravel-m365-mailer
Package laravel-m365-mailer
Short Description Laravel mail transport driver for Microsoft 365 / Microsoft Graph with optional GDPR-conscious logging.
License MIT
Homepage https://github.com/datascaled/laravel-m365-mailer
Informations about the package laravel-m365-mailer
Laravel M365 Mailer
A Laravel mail transport driver for Microsoft 365 / Microsoft Graph with optional GDPR-conscious database logging.
Features
- Full Laravel mailer transport (
transport: m365) for Mailables, Notifications, and queued mails. - Client-credentials flow (
tenant_id,client_id,client_secret). - Optional DB-backed message status history (
queued,sending,sent,failed). - GDPR-oriented defaults: recipient masking + hashing; plaintext recipient storage is opt-in.
- Built-in retention cleanup command:
m365-mail:prune.
Requirements
- PHP 8.3+
- Laravel 11, 12, or 13
Installation
Quick Start (No DB Logging)
-
Configure an
m365mailer inconfig/mail.php. - Use it as default mailer or explicitly when sending:
With default config, package logging is disabled and no package-specific DB writes are made.
Advanced Setup (Enable DB Logging)
-
Publish package config and migrations:
- Enable logging in
config/m365-mailer.phpor.env:
Configuration Reference
config/m365-mailer.php contains:
timeoutsave_to_sent_itemscache_storelogging.enabledlogging.retention_dayslogging.store_recipients_plaintextlogging.require_databaselogging.recipient_hash_key
Per-mailer credentials remain in config/mail.php under mail.mailers.m365.
The sender is always taken from mail.from.address (MAIL_FROM_ADDRESS).
Logging Behavior
logging.enabled = false: package performs no DB logging.logging.enabled = true+require_database = true: missing tables cause a hard fail before sending.- If Graph accepts the message but post-send DB logging fails, sending is not rethrown (prevents duplicate deliveries on queue retry).
Retention / Pruning
Delete old log data:
Override retention window:
Testing
License
MIT
All versions of laravel-m365-mailer with dependencies
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/mail Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
microsoft/microsoft-graph Version ^1.109
spatie/laravel-package-tools Version ^1.16