simonmao / simple-mailer
A simple mail client based on the phpmailer package.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/simonmao/simple-mailer
Requires
- phpmailer/phpmailer: ^6.1
This package is auto-updated.
Last update: 2025-10-11 23:59:23 UTC
README
Usage
composer require simonmao/simple-mailer
Example
Mail Config
config.yaml
email: debug: true host: smtpserver.com port: 587 username: yourname@domain.com password: password encryption: tls # tls/ssl fromEmail: yourname@domain.com fromName: "Mailer"
Load Config
$conf = Noodlehaus\Config::load('config.yaml') ->get('email');
Initialization
$mailer = new \SimpleMailer\SimpleMailer($conf);
Send Text Mail
$bool = $mailer->sendText('xxx@email.com', 'Title', 'hello'); var_dump($bool);
Send HTML Mail
$bool = $mailer->sendHTML('xxx@email.com', 'Title', '<h1>hello</h1>'); var_dump($bool);
Dependents
phpmailer/phpmailer