v2.0.35-20230816

This commit is contained in:
MI15\Win
2023-08-16 01:14:09 +08:00
parent 1ece1135ea
commit 86be0ca786
11 changed files with 82 additions and 14 deletions

View File

@@ -713,10 +713,10 @@ function send_email($config){
$mail->SMTPSecure = $config['secure'];
$mail->Port = intval($config['port']);
if(preg_match('/(.+)<(.+)>/', $config['sender'], $match)){
if(preg_match('/(.+)<(.+@.+)>$/', $config['sender'], $match)){
$mail->setFrom($match[2],$match[1]);
}else{
$mail->setFrom($config['sender']);
$mail->setFrom($config['user'],empty($config['sender'])?'TwoNav':$config['sender']);
}
$mail->addAddress($config['addressee']); //收件人