Skip to content

Commit 15e395c

Browse files
Merge pull request #1256 from suraj-webkul/Issue#1198
Issue #1198 fixed.
2 parents 9ea6015 + eddb410 commit 15e395c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/Webkul/Admin/src/Http/Controllers/Mail/EmailController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function store()
136136
Mail::send(new Email($email));
137137

138138
$this->emailRepository->update([
139-
'folders' => ['inbox', 'sent']
139+
'folders' => ['sent']
140140
], $email->id);
141141
} catch (\Exception $e) {}
142142
}
@@ -151,7 +151,7 @@ public function store()
151151

152152
session()->flash('success', trans('admin::app.mail.create-success'));
153153

154-
return redirect()->route('admin.mail.index', ['route' => 'inbox']);
154+
return redirect()->route('admin.mail.index', ['route' => 'sent']);
155155
}
156156

157157
/**

packages/Webkul/Email/src/Repositories/EmailRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public function processInboundParseMail($content)
138138
]));
139139
} else {
140140
$this->update([
141+
'folders' => array_unique(array_merge($email->folders, ['inbox'])),
141142
'reference_ids' => array_merge($email->reference_ids ?? [], [$headers['message_id']]),
142143
], $email->id);
143144

0 commit comments

Comments
 (0)