⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
wearecrazy
/
public_html
/
@core
/
app
/
Listeners
/
View File Name :
SupportSendMailToAdmin.php
<?php namespace App\Listeners; use App\Mail\BasicMail; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Mail; class SupportSendMailToAdmin { /** * Create the event listener. * * @return void */ public function __construct() { // } /** * Handle the event. * * @param object $event * @return void */ public function handle($event) { $ticket_info = $event->message; if ($ticket_info->notify === 'on' && $ticket_info->type == 'customer'){ //subject $subject = __('your have a new message in ticket').' #'.$ticket_info->id; $admin_email = get_static_option('site_global_email') ?? ''; $message = '<p>'.__('Hello').'<br>'; $message .= 'you have a new message in ticket no'.' #'.$ticket_info->id.'. '; $message .= '<div class="btn-wrap"><a class="anchor-btn" href="'.route('admin.support.ticket.view',$ticket_info->support_ticket_id).'">'.__('check messages').'</a></div>'; $message .= '</p>'; if (!empty($admin_email)){ try { Mail::to($admin_email)->send(new BasicMail([ 'message' => $message, 'subject' => $subject ])); }catch (\Exception $e){ //show error message } } } } }