Download the PHP package xsga/bbphp-emailsender-core without Composer
On this page you can find all versions of the php package xsga/bbphp-emailsender-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bbphp-emailsender-core
BBPHP-EmailSender-Core
Email sending core for PHP applications, built on an abstraction layer and DTOs to decouple the domain from the concrete delivery infrastructure.
Description
This package defines the minimal interface and models needed to send emails from any PHP application without coupling the business logic directly to concrete providers such as SMTP, Resend, or other external services.
The library is designed as a reusable core for projects that need to:
- decouple business logic from email infrastructure;
- normalize the structure of email content;
- allow the delivery provider to change without rewriting the business flow;
- maintain a clear and typed contract for messages.
Project status
This repository contains the base layer of the system:
- supported email method enum;
- email service interface;
- DTO for transferring email information;
- domain-specific exception.
It does not include a final SMTP or Resend implementation in this package; that level is handled in consumer-layer adapters.
Requirements
- PHP 8.4+
- Composer
- Main dependency:
xsga/bbphp-exception
Installation
Package structure
Main components
EmailMethods
Enum that defines the supported providers for the core:
SendEmailService
Interface that defines the contract for any concrete implementation:
EmailDataDto
DTO containing the minimum information needed to build a message:
SendEmailException
Domain exception for sending failures.
Usage example
Design principle
The package follows a contract-based abstraction approach:
EmailDataDtorepresents the message to be delivered.SendEmailServicerepresents the sending mechanism.EmailMethodsidentifies the provider type.- the actual implementation is delegated to the infrastructure layer of the consuming project.
This allows the email technology to be substituted without affecting the main application logic.
License
This project is licensed under the MIT license.
Author
Parker
Useful links
- Repository:
https://github.com/xsga/BBPHP-EmailSender-Core - Composer package:
xsga/bbphp-emailsender-core