update: remind mail i18n

This commit is contained in:
tokumeikoi
2021-08-28 15:39:10 +09:00
parent 982c47d0b4
commit 2d5fb03937
4 changed files with 23 additions and 18 deletions

View File

@ -29,6 +29,22 @@ class MailService
]);
}
public function remindExpire(User $user)
{
if ($user->expired_at !== NULL && ($user->expired_at - 86400) < time() && $user->expired_at > time()) return;
SendEmailJob::dispatch([
'email' => $user->email,
'subject' => __('The service in :app_name is about to expire', [
'app_name' => config('v2board.app_name', 'V2board')
]),
'template_name' => 'remindExpire',
'template_value' => [
'name' => config('v2board.app_name', 'V2Board'),
'url' => config('v2board.app_url')
]
]);
}
private function remindTrafficIsWarnValue($u, $d, $transfer_enable)
{
$ud = $u + $d;