diff --git a/app/Http/Controllers/AppController.php b/app/Http/Controllers/AppController.php index 2ff91cb1bb60..0ec584aaf05c 100644 --- a/app/Http/Controllers/AppController.php +++ b/app/Http/Controllers/AppController.php @@ -206,15 +206,15 @@ class AppController extends BaseController Config::set('mail.from.address', $email); Config::set('mail.from.name', $fromName); - + $data = [ 'text' => 'Test email', ]; try { - $this->mailer->sendTo($email, $email, $fromName, 'Test email', 'contact', $data); + $response = $this->mailer->sendTo($email, $email, $fromName, 'Test email', 'contact', $data); - return 'Sent'; + return $response === true ? 'Sent' : $response; } catch (Exception $e) { return $e->getMessage(); } diff --git a/resources/views/partials/system_settings.blade.php b/resources/views/partials/system_settings.blade.php index c508ba0ee896..a16ef5d24dae 100644 --- a/resources/views/partials/system_settings.blade.php +++ b/resources/views/partials/system_settings.blade.php @@ -48,7 +48,7 @@ ->value(isset($_ENV['MAIL_USERNAME']) ? $_ENV['MAIL_USERNAME'] : '') !!} {!! Former::password('mail[password]')->label('Password') ->value(isset($_ENV['MAIL_PASSWORD']) ? $_ENV['MAIL_PASSWORD'] : '') !!} - {!! Former::actions( Button::primary('Send test email')->small()->withAttributes(['onclick' => 'testMail()']), '  ' ) !!} + {{-- Former::actions( Button::primary('Send test email')->small()->withAttributes(['onclick' => 'testMail()']), '  ' ) --}} @endif