Fixed outgoing mails disabled issue

Fixed language

Fixed languag and email create/edit issue

v1.10.2 build updates

Fixed codacy issues
This commit is contained in:
Manish Verma
2018-10-12 15:51:15 +05:30
committed by Manish Verma
parent ac4e053c2d
commit 6a3d093b4c
12 changed files with 33 additions and 13 deletions

View File

@@ -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');
-- --------------------------------------------------------

View File

@@ -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');
-- --------------------------------------------------------

View File

@@ -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());
}

View File

@@ -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;
}

View File

@@ -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());
}
}
}

View File

@@ -33,7 +33,7 @@ return [
| This tells about aplication current version.
|
*/
'version' => 'Community 1.10.1',
'version' => 'Community 1.10.2',
/*
|--------------------------------------------------------------------------
| Application Name

Binary file not shown.

View File

@@ -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
|=====================================================

View File

@@ -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.',
];

View File

@@ -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 += "<li>" + topic + "</li>";
});
$("#head").html("<div class='alert alert-danger'><strong>Whoops!</strong> There were some problems with your input.<br><br><ul>" + res + "</ul></div>");

View File

@@ -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 += "<li>" + topic + "</li>";
});
$("#head").html("<div class='alert alert-danger'><strong>Whoops!</strong> There were some problems with your input.<br><br><ul>" + res + "</ul></div>");

View File

@@ -29,7 +29,7 @@ class="active"
<h4 class="box-title">{{Lang::get('lang.send-mail-to-diagnos')}}</h4>
</div>
<div class="box-body">
@if(Session::has('success'))
@if(Session::has('success') && !Session::has('fails'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@@ -38,7 +38,7 @@ class="active"
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<div class="alert alert-warning alert-dismissable">
<i class="fa fa-ban"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<b>{!! Lang::get('lang.alert') !!} !</b><br/>