webservco / mail
A PHP component/library.
v1.0.0
2025-02-15 11:14 UTC
Requires
- php: ^8.4
- phpmailer/phpmailer: ^6
- psr/log: ^3
- webservco/command: ^1
- webservco/data: ^1
- webservco/database: ^1
Requires (Dev)
- pds/skeleton: ^1
- phan/phan: ^5
- php-parallel-lint/php-console-highlighter: ^1
- php-parallel-lint/php-parallel-lint: ^1
- phpcompatibility/php-compatibility: ^9
- phpmd/phpmd: ^2
- phpstan/phpstan: ^2
- phpstan/phpstan-deprecation-rules: ^2
- phpstan/phpstan-phpunit: ^2
- phpstan/phpstan-strict-rules: ^2
- phpunit/phpunit: ^10
- slevomat/coding-standard: ^8
- squizlabs/php_codesniffer: ^3
- vimeo/psalm: ^6
- webservco/coding-standards: ^1
- webservco/component-common: ^1
README
A PHP component/library for async email sending.
Setup
- Create table
- Can use custom name if needed.
Usage
Adding email to sending queue
-
Create a
\WebServCo\Mail\DataTransfer\MailItem
DTO. -
Store it:
WebServCo\Mail\Contract\Service\Storage\MailItemStorageInterface
.storeMailItem(MailItem $mailItem): int
.
Sending emails
- Use a scheduled job;
- Process:
MailingProcessorInterface
.process()
; - Get report:
MailingProcessorInterface
.getItemsProcessingReport()
;
TODO
- Add support for attachments;
- Solve Phan "PhanUndeclaredType*";