X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ddb7f33868ea499ab8f48a7062f145e8c0fbe02f..refs/pull/1824/head:/app/Http/Controllers/SettingController.php diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index 1146f22c7..f0a078300 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -1,6 +1,7 @@ withInput(); } + + /** + * Action to send a test e-mail to the current user. + * @param Request $request + * @param User $user + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ + public function sendTestEmail(Request $request) + { + $this->checkPermission('settings-manage'); + + user()->notify(new TestEmail()); + $this->showSuccessNotification(trans('settings.maint_send_test_email_success', ['address' => user()->email])); + + return redirect('/settings/maintenance#image-cleanup')->withInput(); + } }