webservco / mail
A PHP component/library.
v0.12.0
2024-10-15 09:17 UTC
Requires
- php: ^8.3
- phpmailer/phpmailer: ^6
- psr/log: ^3
- webservco/command: ^0
- webservco/data: ^0
- webservco/database: ^0
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: ^1
- phpstan/phpstan-phpunit: ^1
- phpstan/phpstan-strict-rules: ^1
- phpunit/phpunit: ^10
- slevomat/coding-standard: ^8
- squizlabs/php_codesniffer: ^3
- vimeo/psalm: ^5
- webservco/coding-standards: ^0
- webservco/component-common: ^0
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*";