update
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Customer;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use App\Support\MailGlobals;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@@ -28,17 +29,17 @@ class HostingAccountCreated extends TemplateMailable
|
||||
$data = [...MailGlobals::values(), ...$this->data];
|
||||
|
||||
$row = fn (string $label, ?string $value) => $value
|
||||
? "<tr><td style=\"padding: 7px 11px; border-right: 1px solid #e8e8e8;\">{$label}</td><td style=\"padding: 7px 11px; border-right: 1px solid #e8e8e8;\"><strong>{$value}</strong></td></tr>"
|
||||
? EmailTemplateShell::row($label, e($value))
|
||||
: '';
|
||||
|
||||
$pleskBlock = '';
|
||||
if (!empty($data['plesk_login'])) {
|
||||
$pleskBlock = '<p style="color: #f16723;"><strong>TÀI KHOẢN ĐĂNG NHẬP PLESK PANEL</strong></p>'
|
||||
. '<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; table-layout: fixed; border: 1px solid #e8e8e8; border-right: 0;"><tbody>'
|
||||
. '<tr><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; width: 200px;">Địa chỉ Panel:</td><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;"><a style="color: #f16723; text-decoration: none;" href="' . ($data['plesk_panel_url'] ?? '') . '" target="_blank" rel="noopener">' . ($data['plesk_panel_url'] ?? '') . '</a></td></tr>'
|
||||
. '<tr bgcolor="#FFF1E6"><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;">Tên đăng nhập:</td><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;"><strong>' . ($data['plesk_login'] ?? '') . '</strong></td></tr>'
|
||||
. (!empty($data['plesk_password']) ? '<tr><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;">Mật khẩu:</td><td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;"><strong>' . $data['plesk_password'] . '</strong></td></tr>' : '')
|
||||
. '</tbody></table>';
|
||||
$pleskBlock = EmailTemplateShell::paragraph('<strong style="color: #f16723;">TÀI KHOẢN ĐĂNG NHẬP PLESK PANEL</strong>')
|
||||
. EmailTemplateShell::infoTable(array_filter([
|
||||
'Địa chỉ Panel' => '<a style="color: #f16723; text-decoration: none;" href="' . e($data['plesk_panel_url'] ?? '') . '" target="_blank" rel="noopener">' . e($data['plesk_panel_url'] ?? '') . '</a>',
|
||||
'Tên đăng nhập' => e($data['plesk_login']),
|
||||
'Mật khẩu' => !empty($data['plesk_password']) ? e($data['plesk_password']) : null,
|
||||
]));
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -46,9 +47,9 @@ class HostingAccountCreated extends TemplateMailable
|
||||
'full_name' => $data['customer_name'] ?? 'Quý khách',
|
||||
'domain_name' => $data['domain_name'] ?? '',
|
||||
'hosting_plan' => $data['hosting_plan'] ?? '',
|
||||
'server_host_row' => $row('Máy chủ / FTP Host:', $data['server_host'] ?? null),
|
||||
'ftp_username_row' => $row('Tài khoản FTP:', $data['ftp_username'] ?? null),
|
||||
'ftp_password_row' => $row('Mật khẩu FTP:', $data['ftp_password'] ?? null),
|
||||
'server_host_row' => $row('Máy chủ / FTP Host', $data['server_host'] ?? null),
|
||||
'ftp_username_row' => $row('Tài khoản FTP', $data['ftp_username'] ?? null),
|
||||
'ftp_password_row' => $row('Mật khẩu FTP', $data['ftp_password'] ?? null),
|
||||
'ftp_password_notice' => !empty($data['ftp_password'])
|
||||
? '<p style="text-align: justify; color: #b45309; font-size: 13px;">Lưu ý: Vì lý do bảo mật, mật khẩu FTP chỉ được gửi một lần duy nhất qua email và không được lưu trữ trên hệ thống. Vui lòng lưu lại ở nơi an toàn.</p>'
|
||||
: '',
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Customer;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use App\Support\MailGlobals;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@@ -38,7 +39,7 @@ class ManualDepositStatus extends TemplateMailable
|
||||
'status_message' => $data['status_message'] ?? ($data['message'] ?? ''),
|
||||
'deposit_date' => $data['deposit_date'] ?? now()->format('d/m/Y H:i:s'),
|
||||
'processed_date_row' => !empty($data['processed_date'])
|
||||
? '<tr><td style="padding:12px 16px;background-color:#fafafa;color:#78909c;width:42%">Thời gian xử lý</td><td style="padding:12px 16px;color:#263238">' . $data['processed_date'] . '</td></tr>'
|
||||
? EmailTemplateShell::row('Thời gian xử lý', e($data['processed_date']))
|
||||
: '',
|
||||
'portal_url' => $data['portal_url'] ?? MailGlobals::frontendUrl() . '/nap-tien',
|
||||
];
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Customer;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use App\Support\MailGlobals;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailables\Attachment;
|
||||
@@ -44,21 +45,21 @@ class VmCredentials extends TemplateMailable
|
||||
$data = [...MailGlobals::values(), ...$this->data];
|
||||
|
||||
$row = fn (string $label, ?string $value) => $value
|
||||
? "<tr bgcolor=\"#FFF1E6\"><td style=\"padding: 7px 11px; border-right: 1px solid #e8e8e8; width: 200px;\">{$label}</td><td style=\"padding: 7px 11px; border-right: 1px solid #e8e8e8;\"><strong>{$value}</strong></td></tr>"
|
||||
? EmailTemplateShell::row($label, e($value))
|
||||
: '';
|
||||
|
||||
return [
|
||||
'app_name' => $data['company_name'] ?? config('app.name', 'The Gioi So'),
|
||||
'full_name' => $data['client_name'] ?? 'Quý khách',
|
||||
'product_name' => $data['product_name'] ?? 'Cloud VPS',
|
||||
'product_billing_row' => $row('Chu kỳ thanh toán:', $data['product_billing'] ?? null),
|
||||
'product_price_row' => $row('Giá dịch vụ:', !empty($data['product_price']) ? $data['product_price'] . ' VNĐ' : null),
|
||||
'os_name_row' => $row('Hệ điều hành:', $data['os_name'] ?? null),
|
||||
'product_billing_row' => $row('Chu kỳ thanh toán', $data['product_billing'] ?? null),
|
||||
'product_price_row' => $row('Giá dịch vụ', !empty($data['product_price']) ? $data['product_price'] . ' VNĐ' : null),
|
||||
'os_name_row' => $row('Hệ điều hành', $data['os_name'] ?? null),
|
||||
'service_host' => $data['service_host'] ?? '',
|
||||
'service_username' => $data['service_username'] ?? '',
|
||||
'service_password' => $data['service_password'] ?? '',
|
||||
'service_port_row' => $row('Cổng kết nối:', $data['service_port'] ?? null),
|
||||
'service_due_exp_row' => $row('Hạn sử dụng:', $data['service_due_exp'] ?? null),
|
||||
'service_port_row' => $row('Cổng kết nối', $data['service_port'] ?? null),
|
||||
'service_due_exp_row' => $row('Hạn sử dụng', $data['service_due_exp'] ?? null),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Customer;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use App\Support\MailGlobals;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@@ -33,7 +34,7 @@ class VmPasswordChanged extends TemplateMailable
|
||||
'full_name' => $data['fullname'] ?? 'Quý khách',
|
||||
'vm_name' => $data['vm_name'] ?? '',
|
||||
'new_password_row' => $newPassword
|
||||
? '<div>Mật khẩu mới: <strong style="font-family: \'Menlo\',\'Consolas\',monospace; color: #111827;">' . $newPassword . '</strong></div>'
|
||||
? EmailTemplateShell::row('Mật khẩu mới', '<span style="font-family: Menlo,Consolas,monospace; color: #111827;">' . e($newPassword) . '</span>')
|
||||
: '',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user