no message
This commit is contained in:
parent
19f4f5199c
commit
8366f96321
58
src/Services/Tg/Hook/Mod/Email.php
Normal file
58
src/Services/Tg/Hook/Mod/Email.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
//declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Services\Tg\Hook\Mod;
|
||||||
|
|
||||||
|
//use App\Models\Zhuanfas;
|
||||||
|
//use App\Utils\Tools;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\EmailQueue;
|
||||||
|
use function str_replace;
|
||||||
|
use function strip_tags;
|
||||||
|
|
||||||
|
final class Email
|
||||||
|
{
|
||||||
|
|
||||||
|
public function tmp()
|
||||||
|
{
|
||||||
|
$subject = "福云 - 重要通知:域名地址变更!";
|
||||||
|
|
||||||
|
// $content = strip_tags(
|
||||||
|
// str_replace(
|
||||||
|
// ['<p>','</p>'],
|
||||||
|
// ['','<br><br>'],
|
||||||
|
// $request->getParam('content')
|
||||||
|
// ),
|
||||||
|
// ['br', 'a', 'strong']
|
||||||
|
// );
|
||||||
|
|
||||||
|
$content = "主域名fuuu.cloud被封禁,已更换为fuuuu.cloud(多一个u)。";
|
||||||
|
|
||||||
|
// $users = (new User())->where('class', '>=', 0)
|
||||||
|
// ->get();
|
||||||
|
|
||||||
|
$users = (new User())->where("email", "yuejiqi@tuta.io")->get();
|
||||||
|
|
||||||
|
foreach ($users as $user) {
|
||||||
|
(new EmailQueue())->add(
|
||||||
|
$user->email,
|
||||||
|
$subject,
|
||||||
|
'warn.tpl',
|
||||||
|
[
|
||||||
|
'user' => $user,
|
||||||
|
'text' => $content,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return "应该发送成功了";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user