dgwht / email
SMTP发送邮件
v2.0.11
2022-11-04 14:08 UTC
This package is not auto-updated.
Last update: 2025-03-08 01:53:39 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}]";
}