diff --git a/app/Http/Controllers/Agent/helpdesk/MailController.php b/app/Http/Controllers/Agent/helpdesk/MailController.php index a14c027a4..64e22995d 100644 --- a/app/Http/Controllers/Agent/helpdesk/MailController.php +++ b/app/Http/Controllers/Agent/helpdesk/MailController.php @@ -182,7 +182,7 @@ class MailController extends Controller $form_data = null; $team_assign = null; $ticket_status = null; - $result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response); + $result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail->getAttachments()); if ($result[1] == true) { $ticket_table = Tickets::where('ticket_number', '=', $result[0])->first(); diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php index 7794cd99d..5cfe61854 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php @@ -316,8 +316,10 @@ class TicketController extends Controller } } } + // this param is used for inline attachments via email + $inline_attachment = null; //create user - if ($this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status)) { + if ($this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status, $inline_attachment)) { return Redirect('newticket')->with('success', Lang::get('lang.Ticket-created-successfully')); } else { return Redirect('newticket')->with('fails', 'fails'); @@ -647,7 +649,7 @@ class TicketController extends Controller * * @return type bool */ - public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status) + public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status, $mail_data) { // define global variables $email; @@ -721,7 +723,7 @@ class TicketController extends Controller $body2 = null; try { if ($auto_response == 0) { - $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'], $template_variables = ['user' => $user->first_name, 'ticket_number' => $ticket_number2, 'department_sign' => '']); + $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'], $template_variables = ['user' => $username, 'ticket_number' => $ticket_number2, 'department_sign' => '']); } } catch (\Exception $e) { } @@ -770,7 +772,7 @@ class TicketController extends Controller $emails_to_be_sent = array_unique($set_mails, SORT_REGULAR); foreach ($emails_to_be_sent as $email_data) { try { - $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['user' => $email_data['to_user'], 'email' => $email_data['to_email']], $message = ['subject' => $updated_subject, 'body' => $body, 'scenario' => $mail], $template_variables = ['ticket_agent_name' => $email_data['to_user_name'], 'ticket_client_name' => $username, 'ticket_client_email' => $emailadd, 'user' => $email_data['to_user_name'], 'ticket_number' => $ticket_number2, 'email_address' => $emailadd, 'name' => $ticket_creator]); + $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['user' => $email_data['to_user'], 'email' => $email_data['to_email']], $message = ['subject' => $updated_subject, 'body' => $body, 'scenario' => $mail, 'add_embedded_image' => $mail_data], $template_variables = ['ticket_agent_name' => $email_data['to_user_name'], 'ticket_client_name' => $username, 'ticket_client_email' => $emailadd, 'user' => $email_data['to_user_name'], 'ticket_number' => $ticket_number2, 'email_address' => $emailadd, 'name' => $ticket_creator]); } catch (\Exception $e) { } } diff --git a/app/Http/Controllers/Agent/helpdesk/TicketWorkflowController.php b/app/Http/Controllers/Agent/helpdesk/TicketWorkflowController.php index 15b8611d5..7fdc31442 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketWorkflowController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketWorkflowController.php @@ -40,7 +40,7 @@ class TicketWorkflowController extends Controller * * @return type response */ - public function workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response) + public function workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail) { $contact_details = ['email' => $fromaddress, 'email_name' => $fromname, 'subject' => $subject, 'message' => $body]; $ticket_settings_details = ['help_topic' => $helptopic, 'sla' => $sla, 'priority' => $priority, 'source' => $source, 'dept' => $dept, 'assign' => $assign, 'team' => $team_assign, 'status' => $ticket_status, 'reject' => false]; @@ -169,7 +169,7 @@ class TicketWorkflowController extends Controller if ($ticket_settings_details['reject'] == true) { return ['0' => false, '1' => false]; } else { - $create_ticket = $this->TicketController->create_user($contact_details['email'], $contact_details['email_name'], $contact_details['subject'], $contact_details['message'], $phone, $phonecode, $mobile_number, $ticket_settings_details['help_topic'], $ticket_settings_details['sla'], $ticket_settings_details['priority'], $source, $collaborator, $ticket_settings_details['dept'], $ticket_settings_details['assign'], $form_data, $auto_response, $ticket_settings_details['status']); + $create_ticket = $this->TicketController->create_user($contact_details['email'], $contact_details['email_name'], $contact_details['subject'], $contact_details['message'], $phone, $phonecode, $mobile_number, $ticket_settings_details['help_topic'], $ticket_settings_details['sla'], $ticket_settings_details['priority'], $source, $collaborator, $ticket_settings_details['dept'], $ticket_settings_details['assign'], $form_data, $auto_response, $ticket_settings_details['status'], $mail); return $create_ticket; } diff --git a/app/Http/Controllers/Client/helpdesk/ClientTicketController.php b/app/Http/Controllers/Client/helpdesk/ClientTicketController.php index 086245587..ea65cbca4 100644 --- a/app/Http/Controllers/Client/helpdesk/ClientTicketController.php +++ b/app/Http/Controllers/Client/helpdesk/ClientTicketController.php @@ -83,9 +83,10 @@ class ClientTicketController extends Controller $team_assign = null; $ticket_status = null; $auto_response = 0; + + $inline_attachment = null; - $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response); - + $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment); return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied')); } } diff --git a/app/Http/Controllers/Client/helpdesk/FormController.php b/app/Http/Controllers/Client/helpdesk/FormController.php index 6d571a6b9..107618dd5 100644 --- a/app/Http/Controllers/Client/helpdesk/FormController.php +++ b/app/Http/Controllers/Client/helpdesk/FormController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Client\helpdesk; // controllers use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController; use App\Http\Controllers\Controller; +use App\Http\Controllers\Common\FileuploadController; // requests use App\Http\Requests\helpdesk\ClientRequest; use App\Model\helpdesk\Agent\Department; @@ -70,8 +71,11 @@ class FormController extends Controller } else { $phonecode = ''; } - - return view('themes.default1.client.helpdesk.form', compact('topics', 'codes'))->with('phonecode', $phonecode); + $fileupload = new FileuploadController(); + $fileupload = $fileupload->file_upload_max_size(); + $max_size_in_bytes = $fileupload[0]; + $max_size_in_actual = $fileupload[1]; + return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode); } else { return \Redirect::route('home'); } @@ -189,7 +193,13 @@ class FormController extends Controller } } } - $result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response); + // this param is used for inline attachments via email + if(empty($attachments)) { + $inline_attachment = $attachments; + } else { + $inline_attachment = null; + } + $result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response, $inline_attachment); if ($result[1] == 1) { $ticketId = Tickets::where('ticket_number', '=', $result[0])->first(); diff --git a/app/Http/Controllers/Common/FileuploadController.php b/app/Http/Controllers/Common/FileuploadController.php index e1b57a815..820245273 100644 --- a/app/Http/Controllers/Common/FileuploadController.php +++ b/app/Http/Controllers/Common/FileuploadController.php @@ -9,9 +9,9 @@ class FileuploadController extends Controller public function __construct() { // checking authentication - $this->middleware('auth'); + // $this->middleware('auth'); // checking if role is agent - $this->middleware('role.agent'); + // $this->middleware('role.agent'); } // Returns a file size limit in bytes based on the PHP upload_max_filesize diff --git a/app/Http/Controllers/Common/PhpMailController.php b/app/Http/Controllers/Common/PhpMailController.php index 7dadd33bb..b6813688a 100644 --- a/app/Http/Controllers/Common/PhpMailController.php +++ b/app/Http/Controllers/Common/PhpMailController.php @@ -84,6 +84,13 @@ class PhpMailController extends Controller $attachment = null; } + // Inline Attachments + if (isset($message['add_embedded_image'])) { + $add_embedded_images = $message['add_embedded_image']; + } else { + $add_embedded_images = null; + } + // template variables if (Auth::user()) { $agent = Auth::user()->user_name; @@ -265,6 +272,40 @@ class PhpMailController extends Controller $mail->addAttachment($file_path, $file_name); } } + + // inline images embedded as attachments + if ($add_embedded_images != null) { + // dd($add_embedded_images); + foreach ($add_embedded_images as $add_embedded_image) { + if(isset($add_embedded_image->id)) { + $cid = $add_embedded_image->id; + } else { + $cid = null; + } + if(isset($add_embedded_image->name)) { + $file_name = $add_embedded_image->name; + } else { + $file_name = null; + } + if(isset($add_embedded_image->filePath)) { + $file_path = $add_embedded_image->filePath; + } else { + $file_path = null; + } + if(isset($add_embedded_image->disposition)) { + if($add_embedded_image->disposition == 'INLINE') { + $mail->AddEmbeddedImage($file_path, $cid, $file_name); + } else { + $mail->addAttachment($file_path, $file_name); + } + } else { + $file_path = $add_embedded_image->getRealPath(); + $file_name = $add_embedded_image->getClientOriginalName(); + $mail->addAttachment($file_path, $file_name); + } + } + } + $mail->CharSet = 'utf8'; $mail->Subject = $subject; if ($template == 'ticket-reply-agent') { diff --git a/app/Model/helpdesk/Ticket/Ticket_Thread.php b/app/Model/helpdesk/Ticket/Ticket_Thread.php index f531e6857..cc46de0f4 100644 --- a/app/Model/helpdesk/Ticket/Ticket_Thread.php +++ b/app/Model/helpdesk/Ticket/Ticket_Thread.php @@ -2,9 +2,10 @@ namespace App\Model\helpdesk\Ticket; -use App\BaseModel; +//use App\BaseModel; +use Illuminate\Database\Eloquent\Model; -class Ticket_Thread extends BaseModel +class Ticket_Thread extends Model { protected $table = 'ticket_thread'; protected $fillable = [ diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 000000000..712f9b035 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_55 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 000000000..7d4cd084b --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + faveo helpdesk master + + + diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index a848a7225..0c239fdd7 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -1394,5 +1394,12 @@ return [ 'use_subject' => 'Use Subject', 'reopen' => 'Reopen', 'invalid_attempt' => 'Invalid Attempt', - + + /**-------------------------------------------------------------------------------------------- + * Attachment Updated + * -------------------------------------------------------------------------------------------- + */ + 'unable_to_load_file_type' => 'Unable to load file type', + + ]; diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php index 378769b47..1be98edee 100644 --- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php +++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php @@ -75,7 +75,6 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where( if ($rating_value == null) { $avg_rating = '0'; } else { - $avg_rate = explode('.', $rating_value); $avg_rating = $avg_rate[0]; } @@ -109,7 +108,6 @@ if ($thread->title != "") { id)); - if ($group->can_edit_ticket == 1) { ?> @@ -444,7 +442,7 @@ if ($thread->title != "") {
-
+
@@ -491,7 +489,7 @@ if ($thread->title != "") { setPath(url('/thread/' . $tickets->id))->render(); ?> -
+
@@ -507,7 +505,6 @@ if ($thread->title != "") { created_at; $ConvDate = explode(' ', $ConvDate1); - $date = $ConvDate[0]; $time = $ConvDate[1]; $time = substr($time, 0, -3); @@ -521,7 +518,7 @@ if ($thread->title != "") { } if($conversation->user_id != null) { $role = App\User::where('id', '=', $conversation->user_id)->first(); - } + } ?>
  • @@ -555,36 +552,40 @@ if ($thread->title != "") { // echo " "; $body = $conversation->body; $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get(); - // $i = 0; - foreach ($attachments as $attachment) { - // $i++; - if ($attachment->type == 'jpg' || $attachment->type == 'png') { - $image = @imagecreatefromstring($attachment->file); - ob_start(); - imagejpeg($image, null, 80); - $data = ob_get_contents(); - ob_end_clean(); - $var = ''; - // echo $var; - // echo $attachment->name; - // $body = explode($attachment->name, $body); - $body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body); - $string = $body; - $start = ""; - $end = ""; - if (strpos($string, $start) == false || strpos($string, $start) == false) { + foreach ($attachments as $attachment) { + if ($attachment->type == 'jpg' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'gif' || $attachment->type == 'GIF') { + if($attachment->size > 0) { + $image = @imagecreatefromstring($attachment->file); + if($image == false) { + } else { + ob_start(); + imagejpeg($image, null, 80); + $data = ob_get_contents(); + ob_end_clean(); + $var = ''; + // echo $var; + // echo $attachment->name; + // $body = explode($attachment->name, $body); + $body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body); + $string = $body; + $start = ""; + $end = ""; + if (strpos($string, $start) == false || strpos($string, $start) == false) { + + } else { + $ini = strpos($string, $start); + $ini += strlen($start); + $len = strpos($string, $end, $ini) - $ini; + $parsed = substr($string, $ini, $len); + $body2 = $parsed; + $body = str_replace($body2, " ", $body); + } + } + } } else { - $ini = strpos($string, $start); - $ini += strlen($start); - $len = strpos($string, $end, $ini) - $ini; - $parsed = substr($string, $ini, $len); - $body2 = $parsed; - $body = str_replace($body2, " ", $body); } - } else { - } } // echo $body; // $body = explode($attachment->file, $body); @@ -619,9 +620,6 @@ if ($thread->title != "") { ?>
    - @if($role) - @if($role->role != null) - @if($role->role != 'user' && $conversation->is_internal != 1) @foreach($ratings as $rating) @if($rating->rating_area == 'Comment Area') title != "") { ?>   - - - @endif - @endforeach +      + + @endif - @endif - @endif + @endforeach
    {!! $rating->name !!}  
    + rating_scale; $i++) { ?> /> -      -

    @@ -723,24 +718,32 @@ if ($thread->title != "") {
      size; - $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); - $power = $size > 0 ? floor(log($size, 1024)) : 0; - $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power]; - if ($attachment->poster == 'ATTACHMENT') { - if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') { - $image = @imagecreatefromstring($attachment->file); - ob_start(); - imagejpeg($image, null, 80); - $data = ob_get_contents(); - ob_end_clean(); - $var = ''; - echo '
    • ' . $var . '
      ' . $attachment->name . '

      ' . $value . '

    • '; - } else { - $var = '' . strtoupper($attachment->type) . '
      ' . $attachment->name . '

      ' . $value . '

      '; - echo '
    • ' . $var . '
    • '; + + $size = $attachment->size; + $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + $power = $size > 0 ? floor(log($size, 1024)) : 0; + $value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power]; + if ($attachment->poster == 'ATTACHMENT') { + if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') { + $image = @imagecreatefromstring($attachment->file); + + if($image == false) { + $var = '' . strtoupper($attachment->type) . '
      ' . $attachment->name . '

      ' . $value . '

      '; + echo '
    • ' . $var . '
    • '; + } else { + ob_start(); + imagejpeg($image, null, 80); + $data = ob_get_contents(); + ob_end_clean(); + $var = ''; + echo '
    • ' . $var . '
      ' . $attachment->name . '

      ' . $value . '

    • '; + } + } else { + $var = '' . strtoupper($attachment->type) . '
      ' . $attachment->name . '

      ' . $value . '

      '; + echo '
    • ' . $var . '
    • '; + } } - } + } ?>
    @@ -1083,7 +1086,6 @@ if ($thread->title != "") {
    + + + @if(Auth::user()) + + {!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!} + + @else +
    + {!! Form::label('Name',Lang::get('lang.name')) !!} * + {!! Form::text('Name',null,['class' => 'form-control']) !!} +
    + @endif + + + + @if(Auth::user()) + + {!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!} + + @else +
    + {!! Form::label('Email',Lang::get('lang.email')) !!} * + {!! Form::text('Email',null,['class' => 'form-control']) !!} +
    + @endif + + + + + + @if(!Auth::user()) + +
    + {!! Form::label('Code',Lang::get('lang.country-code')) !!} + {!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!} +
    +
    + {!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!} + {!! Form::text('Mobile',null,['class' => 'form-control']) !!} +
    +
    + {!! Form::label('Phone',Lang::get('lang.phone')) !!} + {!! Form::text('Phone',null,['class' => 'form-control']) !!} +
    + @endif
    {!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!} {!! $errors->first('help_topic', ':message') !!} @@ -110,50 +155,6 @@ class = "active" @endforeach
    - - @if(Auth::user()) - - {!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!} - - @else -
    - {!! Form::label('Name',Lang::get('lang.name')) !!} * - {!! Form::text('Name',null,['class' => 'form-control']) !!} -
    - @endif - - - - @if(Auth::user()) - - {!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!} - - @else -
    - {!! Form::label('Email',Lang::get('lang.email')) !!} * - {!! Form::text('Email',null,['class' => 'form-control']) !!} -
    - @endif - - - - - - @if(!Auth::user()) - -
    - {!! Form::label('Code',Lang::get('lang.country-code')) !!} - {!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!} -
    -
    - {!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!} - {!! Form::text('Mobile',null,['class' => 'form-control']) !!} -
    -
    - {!! Form::label('Phone',Lang::get('lang.phone')) !!} - {!! Form::text('Phone',null,['class' => 'form-control']) !!} -
    - @endif
    {!! Form::label('Subject',Lang::get('lang.subject')) !!} * {!! Form::text('Subject',null,['class' => 'form-control']) !!} @@ -163,14 +164,18 @@ class = "active" {!! Form::textarea('Details',null,['class' => 'form-control']) !!}
    -
    {!! Lang::get('lang.attachment') !!}

    - {!! Lang::get('lang.max') !!}. 10MB +
    {!! Lang::get('lang.attachment') !!}

    +
    + {!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!} +
    + +
    {{-- Event fire --}}
    -
    {!! Form::submit(Lang::get('lang.Send'),['class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}
    +
    {!! Form::submit(Lang::get('lang.Send'),['id' => 'submitbtn' ,'class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}
    @@ -183,22 +188,87 @@ class = "active" |==================================================== --> @stop \ No newline at end of file diff --git a/vendor/php-imap/php-imap/src/PhpImap/Mailbox.php b/vendor/php-imap/php-imap/src/PhpImap/Mailbox.php index af7a5a3ee..b9d3c008e 100644 --- a/vendor/php-imap/php-imap/src/PhpImap/Mailbox.php +++ b/vendor/php-imap/php-imap/src/PhpImap/Mailbox.php @@ -146,7 +146,7 @@ class Mailbox { * @return array mailsIds (or empty array) */ public function searchMailbox($criteria = 'ALL') { - $mailsIds = imap_search($this->getImapStream(), 'ALL', SE_UID, $this->serverEncoding); + $mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID, $this->serverEncoding); return $mailsIds ? $mailsIds : array(); } /**