cbowofrivia / dmarc-record-builder
A lean package that makes creating DMARC records user friendly
Installs: 113 839
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/cbowofrivia/dmarc-record-builder
Requires
- php: ^8.2
- illuminate/collections: ^12.0
- webmozart/assert: ^1.10
Requires (Dev)
- laravel/pint: ^1.15
- pestphp/pest: ^3
- symfony/var-dumper: ^7.0
- dev-main
- 2.1.0
- 2.0.0
- 1.0.1
- 1.0.0
- 1.0.0-rc
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/github_actions/aglipanci/laravel-pint-action-2.3.1
- dev-dependabot/github_actions/dependabot/fetch-metadata-2.4.0
- dev-cbowofrivia/dmarcbis-support
- dev-dmarcbis
- dev-cbowofrivia-php8.4-support
- dev-cbow/feature--add-parse-functionality
This package is auto-updated.
Last update: 2025-10-27 08:30:51 UTC
README
Installation
You can install the package via composer:
composer require cbowofrivia/dmarc-record-builder
Usage
$record = new DmarcRecord(); $record->policy('none') ->subdomainPolicy('none') ->pct(100) ->rua('mailto:example@example.com') ->ruf('mailto:example@example.com') ->adkim('relaxed') ->aspf('relaxed') ->reporting('any') ->interval(604800); $record = (string) $record; // v=DMARC1; p=none; sp=none; pct=100; rua=mailto:example@example.com; ruf=mailto:example@example.com; fo=1; adkim=r; aspf=r; ri=604800;
You can also build the record in the constructor
$record = new DmarcRecord( version: 'DMARC1', policy: 'none', subdomain_policy: 'none', pct: 100, rua: 'mailto:example@example.com', ruf: 'mailto:example@example.com', adkim: 'relaxed', aspf: 'relaxed', reporting: 'any', interval: 604800 ); $record = (string) $record; // v=DMARC1; p=none; sp=none; pct=100; rua=mailto:example@example.com; ruf=mailto:example@example.com; fo=1; adkim=r; aspf=r; ri=604800;
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.