solid-php-example
solid-php-example copied to clipboard
Refactor and Implement Send Functionality in Mailer Classes with Usage Example
This update implements the send() method in both the SmtpMailer and SendGridMailer classes, providing output to demonstrate their functionality. Additionally, I added a sendWelcome() method to the SendWelcomeMessage class, which calls the send() method on the provided mailer instance.
A usage example is included to showcase how SendWelcomeMessage can work with different mailer implementations, adhering to the Dependency Inversion Principle (DIP). This enhances code clarity and illustrates how the mailers can be easily swapped.