Skip to content

Commit 45a1b7d

Browse files
committed
Added event filter for email settings to allow adding new providers
1 parent 56e8b84 commit 45a1b7d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

admin/controller/settings/email.php

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use function Vvveb\email;
2929
use function Vvveb\setConfig;
3030
use Vvveb\System\Config;
31+
use Vvveb\System\Event;
3132
use Vvveb\System\Validator;
3233

3334
class Email extends Base {
@@ -81,6 +82,11 @@ function save() {
8182

8283
function index() {
8384
$settings = config('mail', []);
85+
86+
$drivers = ['mail' => 'Mail', 'smtp' => 'Smtp'];
87+
list($drivers) = Event::trigger(__CLASS__, __FUNCTION__, $drivers);
88+
8489
$this->view->email = $settings;
90+
$this->view->drivers = $drivers;
8591
}
8692
}

0 commit comments

Comments
 (0)