glpzzz/object2email

Simple solution to obtain a Symfony/Email representation of any object by implementing the provided interface

1.0.0 2024-03-06 05:35 UTC

This package is auto-updated.

Last update: 2024-11-06 07:11:59 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());

License

MIT