glpzzz / object2email
Simple solution to obtain a Symfony/Email representation of any object by implementing the provided interface
v1.1.0
2026-08-30 21:46 UTC
Requires
- php: >=8.1
- symfony/mailer: ^6.0 || ^7.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-30 21:48:40 UTC
README
Simple solution to prepare a Symfony Email by implementing an interface in any class
The idea is to provide a common interface to for objects to be sent via Symfony Mailer.
Installation
Install using composer
composer require glpzzz/object2email
Usage
$p = new Person() // or obtain from db // work with it, modify it, set the properties... $mailer->send($p->toEmail());