1 Star 0 Fork 2

小线/swoole_log

forked from pl1998/swoole_log 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
helpers.php 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
pl1998 提交于 2020-10-13 15:42 . 新增可视化页面
<?php
/**
* Created by PhpStorm
* User: pl
* Date: 2020/9/21
* Time: 11:35.
*/
use PHPMailer\PHPMailer\PHPMailer;
/**
* 邮件发送
*
* @param $content
* @param $email_address
*
* @throws \PHPMailer\PHPMailer\Exception
*/
function send_email($content, $email_address)
{
$config = require __DIR__.'/config/email.php';
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = $config['host'];
$mail->SMTPAuth = true;
$mail->Username = $config['username'];
$mail->Password = $config['password'];
$mail->SMTPSecure = $config['smtp_secure'];
$mail->Port = $config['port'];
$mail->setFrom($config['setfrom'], 'latent');
$mail->addAddress($config['address'], 'latent');
$mail->addReplyTo($config['setfrom'], 'latent');
$mail->isHTML(false);
//设置邮件标题
$mail->Subject = 'bi接口错误';
$mail->Body = $content;
$mail->AltBody = $content;
$mail->send();
}
/**
* 参数类型判断.
*
* @param array $array
* @param $effect_array
*
* @return bool
*/
function intended_effect(array $array, $effect_array)
{
if ([] == array_diff($array, $effect_array)) {
return true;
} else {
return false;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/fjsleeping/swoole_log.git
git@gitee.com:fjsleeping/swoole_log.git
fjsleeping
swoole_log
swoole_log
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385