glpzzz / object2email
Simple solution to obtain a Symfony/Email representation of any object by implementing the provided interface
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/glpzzz/object2email
Requires
- symfony/mailer: ^6.0
This package is auto-updated.
Last update: 2025-10-06 09:04:47 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());