solid-php-example icon indicating copy to clipboard operation
solid-php-example copied to clipboard

Refactor and Implement Send Functionality in Mailer Classes with Usage Example

Open Risad212 opened this issue 1 year ago • 0 comments

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.

Risad212 avatar Nov 01 '24 06:11 Risad212