hahalo / php-mailer
smtp mailer sender via http proxy
v0.01
2020-10-31 19:17 UTC
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.5
README
send email with smtp (support http proxy)
Install
composer require Hahalo/php-mailer
Usage
<?php $transport = new \Hahalo\Mailer\SMTPTransport( [ 'host' => 'smtp.gmail.com', 'port' => 465, 'encryption' => 'ssl', 'username' => 'your username', 'password' => 'your password', 'httpProxy' => 'http://proxy.com:8080' //user http proxy ] ); $mailer = new \Hahalo\Mailer\Mailer($transport); $mailer->setFrom('from@example.com') ->setTo('to@example.com') ->setSubject('subject') ->setText('email from php mailer') ->send();