dgwht / email
SMTP发送邮件
v2.0.12
2022-11-04 14:08 UTC
This package is not auto-updated.
Last update: 2026-04-27 09:26:37 UTC
README
安装
composer require dgwht/email
邮件发送
use dgwht\Email; // 端口非25时自动采用ssl方式 Email::setConfig([ "host" => "smtp.exmail.qq.com", "port" => "25", "user" => "admin@dgwht.com", "pass" => "xxxxxxxxx", "email" => "admin@dgwht.com", ]); $ret = Email::send('2393176043@qq.com','标题测试','内容测试'); if($ret === true){ echo "发送成功"; }else{ echo "发送失败:[{$ret}]"; }