baywa-re-lusy / email
BayWa r.e. LUSY Email Tools
2.0.0
2022-12-17 13:35 UTC
Requires
- php: >= 8.1
- aws/aws-sdk-php: ^3.253
- mailgun/mailgun-php: ^3.5
- nyholm/psr7: ^1.4
Requires (Dev)
- phpstan/phpstan: ^1.9
- squizlabs/php_codesniffer: ^3.5
README
Installation
To install the Email tools, you will need Composer in your project:
composer require baywa-re-lusy/email
Usage
Currently, this library supports MailGun and SendGrid.
MailGun
use BayWaReLusy\Email\Adapter\MailgunAdapter; use BayWaReLusy\Email\EmailService; $adapter = new MailgunAdapter('mailgun-api-key', 'mailgun-domain', 'https://api.eu.mailgun.net/'); $emailService = new EmailService($adapter);
AWS SES
use BayWaReLusy\Email\Adapter\AwsAdapter; use BayWaReLusy\Email\EmailService; $adapter = new AwsAdapter('aws-key', 'aws-secret', 'aws-region', 'domain'); $emailService = new EmailService($adapter);