@if (Auth::user()->admin->getPermission("setting_general") == 'yes')
@include('helpers.form_control', [ 'type' => 'select', 'name' => 'env[MAIL_MAILER]', 'label' => trans('messages.mail_driver'), 'value' => (isset($env["MAIL_MAILER"]) ? $env["MAIL_MAILER"] : ""), 'options' => [["value" => "sendmail", "text" => trans('messages.system.sendmail')],["value" => "smtp", "text" => trans('messages.smtp')]], 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_HOST]', 'label' => trans('messages.hostname'), 'value' => (isset($env["MAIL_HOST"]) ? $env["MAIL_HOST"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_PORT]', 'label' => trans('messages.port'), 'value' => (isset($env["MAIL_PORT"]) ? $env["MAIL_PORT"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_ENCRYPTION]', 'label' => trans('messages.encryption'), 'value' => (isset($env["MAIL_ENCRYPTION"]) ? $env["MAIL_ENCRYPTION"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_USERNAME]', 'label' => trans('messages.username'), 'value' => (isset($env["MAIL_USERNAME"]) ? $env["MAIL_USERNAME"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'password', 'name' => 'env[MAIL_PASSWORD]', 'label' => trans('messages.password'), 'value' => (isset($env["MAIL_PASSWORD"]) ? $env["MAIL_PASSWORD"] : ""), 'help_class' => 'env', 'eye' => true, 'rules' => $rules ])

{{ trans('messages.system.sendmail.warning') }}

{{ trans('messages.system.sendmail.warning.desc') }}

@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_FROM_ADDRESS]', 'label' => trans('messages.from_email'), 'value' => (isset($env["MAIL_FROM_ADDRESS"]) ? $env["MAIL_FROM_ADDRESS"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[MAIL_FROM_NAME]', 'label' => trans('messages.from_name'), 'value' => (isset($env["MAIL_FROM_NAME"]) ? $env["MAIL_FROM_NAME"] : ""), 'help_class' => 'env', 'rules' => $rules ])
@include('helpers.form_control', [ 'type' => 'text', 'name' => 'env[sendmail_path]', 'label' => trans('messages.sendmail_path'), 'value' => (isset($env["sendmail_path"]) ? $env["sendmail_path"] : ""), 'help_class' => 'env', 'rules' => ['mailer.sendmail_path' => 'required'] ])

{{ trans('messages.setting.mailer.send_a_test_email') }}
@endif