diff --git a/DB/demodatabase.sql b/DB/demodatabase.sql index 3d828a3cf..7e3d0bd0f 100644 --- a/DB/demodatabase.sql +++ b/DB/demodatabase.sql @@ -1457,7 +1457,7 @@ CREATE TABLE `settings_system` ( -- INSERT INTO `settings_system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `api_enable`, `api_key_mandatory`, `api_key`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `version`, `created_at`, `updated_at`) VALUES -(1, 1, '', '', '1', '', '', '', 0, 0, '', '', NULL, NULL, 1, '', 32, '', '1.10.1', '2016-12-13 03:19:29', '2016-12-13 03:19:29'); +(1, 1, '', '', '1', '', '', '', 0, 0, '', '', NULL, NULL, 1, '', 32, '', '1.10.2', '2016-12-13 03:19:29', '2016-12-13 03:19:29'); -- -------------------------------------------------------- diff --git a/DB/dummy-data.sql b/DB/dummy-data.sql index 3d828a3cf..7e3d0bd0f 100644 --- a/DB/dummy-data.sql +++ b/DB/dummy-data.sql @@ -1457,7 +1457,7 @@ CREATE TABLE `settings_system` ( -- INSERT INTO `settings_system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `api_enable`, `api_key_mandatory`, `api_key`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `version`, `created_at`, `updated_at`) VALUES -(1, 1, '', '', '1', '', '', '', 0, 0, '', '', NULL, NULL, 1, '', 32, '', '1.10.1', '2016-12-13 03:19:29', '2016-12-13 03:19:29'); +(1, 1, '', '', '1', '', '', '', 0, 0, '', '', NULL, NULL, 1, '', 32, '', '1.10.2', '2016-12-13 03:19:29', '2016-12-13 03:19:29'); -- -------------------------------------------------------- diff --git a/app/Http/Controllers/Admin/helpdesk/TemplateController.php b/app/Http/Controllers/Admin/helpdesk/TemplateController.php index 7103f7407..6da51ca25 100644 --- a/app/Http/Controllers/Admin/helpdesk/TemplateController.php +++ b/app/Http/Controllers/Admin/helpdesk/TemplateController.php @@ -339,7 +339,9 @@ class TemplateController extends Controller $this->PhpMailController->sendmail($from, $to_address, $message, [], []); - return redirect()->back()->with('success', 'Mail has send successfully'); + return redirect()->back()->with( + 'success', + trans('lang.mail-sent-to-job-for-process')); } catch (Exception $e) { return redirect()->back()->with('fails', $e->getMessage()); } diff --git a/app/Http/Controllers/Common/PhpMailController.php b/app/Http/Controllers/Common/PhpMailController.php index adea64cf9..bea8704ec 100644 --- a/app/Http/Controllers/Common/PhpMailController.php +++ b/app/Http/Controllers/Common/PhpMailController.php @@ -26,7 +26,10 @@ class PhpMailController extends Controller public function fetch_smtp_details($id) { - $emails = Emails::where('id', '=', $id)->first(); + $emails = Emails::where( + [['id', '=', $id], + ['sending_status', '=', 1]]) + ->first(); return $emails; } diff --git a/app/Jobs/SendEmail.php b/app/Jobs/SendEmail.php index c8e666a41..c09289c0e 100644 --- a/app/Jobs/SendEmail.php +++ b/app/Jobs/SendEmail.php @@ -36,8 +36,13 @@ class SendEmail extends Job implements ShouldQueue */ public function handle(PhpMailController $PhpMailController) { - $p = $PhpMailController->sendEmail($this->from, $this->to, $this->message, $this->template); + try { + $p = $PhpMailController->sendEmail($this->from, $this->to, $this->message, $this->template); - return $p; + return $p; + } catch (\Exception $e) { + logger()->warning($e->getMessage()); + session()->flash('fails', $e->getMessage()); + } } } diff --git a/config/app.php b/config/app.php index a93e06812..ec18d2635 100644 --- a/config/app.php +++ b/config/app.php @@ -33,7 +33,7 @@ return [ | This tells about aplication current version. | */ - 'version' => 'Community 1.10.1', + 'version' => 'Community 1.10.2', /* |-------------------------------------------------------------------------- | Application Name diff --git a/public/downloads/en.zip b/public/downloads/en.zip index 0e4ab9c5d..969190d7f 100644 Binary files a/public/downloads/en.zip and b/public/downloads/en.zip differ diff --git a/release-notes.txt b/release-notes.txt index eda835898..3fab6bbc2 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -7,6 +7,15 @@ |_| \__,_| \_/ \___|\___/ |_| |_|\___|_| .__/ \__,_|\___||___/_|\_\ | | |_| +|===================================================== +| v1.10.2 Bug Fix Patch +|===================================================== +### Bugs Fixed +- Fixed #702, agents are unable to view their tickets +- Fixed #701, turning off outgoing mails does not stop outgoing sending emails. +- Fixed email edit/create page does not show proper error messages + + |===================================================== | v1.10.1 Laravel Framework update |===================================================== diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index b417da286..1919147b0 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -162,7 +162,7 @@ return [ 'email_deleted_sucessfully' => 'Email deleted sucessfully', 'email_can_not_delete' => 'Email can not delete', 'outgoing_email_failed' => 'Outgoing email failed', - 'system-email-not-configured' => 'We are unable to process email request as the system has no configured email for sending mails. Please contact and report system admin.', + 'system-email-not-configured' => 'System could not send emails to users as it does not have the email configured to send outgoing mails. Please contact and report system admin.', /* |-------------------------------------- | Ban Emails Create Page @@ -1565,7 +1565,7 @@ return [ 'created-at' => 'Created at', 'or' => 'OR', 'activate' => 'Activate', - 'system-email-not-configured' => 'We are unable to process email request as the system has no configured email for sending mails. Please contact and report system admin.', + 'system-email-not-configured' => 'System could not send emails to users as it does not have the email configured to send outgoing mails. Please contact and report system admin.', 'assign-ticket' => 'Assign tickets', 'can-not-inactive-group' => 'Can not make the group inactive as it has agents assigned in it. Please assign those agents to another group and try again.', 'internal-note-has-been-added' => 'Internal note added to the ticket', @@ -1643,4 +1643,5 @@ return [ 'ticket_created_source' => 'This ticket is created via :source', 'ticket-has-x-priority' => 'This ticket has :priority priority', 'clean-forever' => 'delete permanently', + 'mail-sent-to-job-for-process' => 'Mail has been sent to job for process, it will appear in your mailbox once it gets processed by your selected queue service. If you don\'t recieve the mail check logs for errors or warnings.', ]; diff --git a/resources/views/themes/default1/admin/helpdesk/emails/emails/create.blade.php b/resources/views/themes/default1/admin/helpdesk/emails/emails/create.blade.php index 70b5705be..889458591 100644 --- a/resources/views/themes/default1/admin/helpdesk/emails/emails/create.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/emails/emails/create.blade.php @@ -277,7 +277,7 @@ class="active" console.log(json); $("#close").trigger("click"); var res = ""; - $.each(json.responseJSON, function (idx, topic) { + $.each(json.responseJSON.errors, function (idx, topic) { res += "
  • " + topic + "
  • "; }); $("#head").html("
    Whoops! There were some problems with your input.

    "); diff --git a/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php b/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php index eb8e4ed46..536cda9a7 100644 --- a/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php @@ -307,7 +307,7 @@ class="active" error: function (json) { $("#close").trigger("click"); var res = ""; - $.each(json.responseJSON, function (idx, topic) { + $.each(json.responseJSON.errors, function (idx, topic) { res += "
  • " + topic + "
  • "; }); $("#head").html("
    Whoops! There were some problems with your input.

    "); diff --git a/resources/views/themes/default1/admin/helpdesk/emails/template/formDiagno.blade.php b/resources/views/themes/default1/admin/helpdesk/emails/template/formDiagno.blade.php index 92f3781fa..fb6e7c591 100644 --- a/resources/views/themes/default1/admin/helpdesk/emails/template/formDiagno.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/emails/template/formDiagno.blade.php @@ -29,7 +29,7 @@ class="active"

    {{Lang::get('lang.send-mail-to-diagnos')}}

    - @if(Session::has('success')) + @if(Session::has('success') && !Session::has('fails'))
    @@ -38,7 +38,7 @@ class="active" @endif @if(Session::has('fails')) -
    +
    {!! Lang::get('lang.alert') !!} !