g4 / mailer
mailer php library with multiple mail providers (smtp, amazon_ses)
Installs: 2 304
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 12
Forks: 4
Open Issues: 0
Requires
- php: >=8.3
- ext-curl: *
- ext-json: *
- laminas/laminas-mail: 2.25.*
- laminas/laminas-servicemanager: 3.22.*
Requires (Dev)
- phpunit/phpunit: 9.*
README
mailer - php library
Install
Via Composer
composer require g4/mailer
Usage
<?php // Config data $options = [ 'delivery' => "smtp", 'adapter' => "smtp", 'params' => [ 'host' => "smtp.example.com", 'port' => "587", 'connection_class' => "plain", 'connection_config' => [ 'ssl' => "tls", 'username' => "smtp_username", 'password' => "smtp_password" ] ] ]; // Create message $message = new \G4\Mailer\Message( 'receiver@example.com', 'sender@example.com', 'Email subject', 'This is a <strong>html</strong> email part', 'This is a text email part' ); // Create mailer instance $mailer = \G4\Mailer\Mailer::factory($options); // send message $mailer->send($message); ?>
Development
Install dependencies
$ make install
Run tests
$ make test
License
(The MIT License) see LICENSE file for details...