@extends('su-admin.layout.master') @section('content') @php if(!isset($_GET['tab'])){ $tab = ''; }else{ $tab = $_GET['tab']; } @endphp
@if (session()->has('message')) @endif

Smtp

@if (get_network_status())
@foreach ( get_networks() as $key => $network )
{!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal']) !!}
{!! Form::label('host', 'Host', ['class' => 'form-label'] ) !!}
{!! Form::text('host', get_network_field($network['id'], 'smtp', 'app', 'host', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::label('encryption', 'Encryption', ['class' => 'form-label'] ) !!}
{!! Form::select('encryption', array('none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS'), get_network_field($network['id'], 'smtp', 'app', 'encryption', 'smtps' ), ['class' => 'form-select' ]) !!}
{!! Form::label('port', 'Porta', ['class' => 'form-label'] ) !!}
{!! Form::text('port', get_network_field($network['id'], 'smtp', 'app', 'port', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::checkbox('autotls', "1", get_network_field($network['id'], 'smtp', 'app', 'autotls', 'smtps' ), ['class' => 'form-check-input', 'id' => 'autotls' ]) !!} {!! Form::label('autotls', 'Auto TLS', ['class' => 'form-check-label'] ) !!}
{!! Form::checkbox('authentication', "1", get_network_field($network['id'], 'smtp', 'app', 'authentication', 'smtps' ), ['class' => 'form-check-input', 'id' => 'authentication' ]) !!} {!! Form::label('authentication', 'Authentication', ['class' => 'form-check-label'] ) !!}
{!! Form::label('username', 'SMTP Username', ['class' => 'form-label'] ) !!}
{!! Form::text('username', get_network_field($network['id'], 'smtp', 'app', 'username', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::label('password', 'SMTP Password', ['class' => 'form-label'] ) !!}
{!! Form::input('password', 'password', get_network_field($network['id'], 'smtp', 'app', 'password', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::label('from_email', 'From Email', ['class' => 'form-label'] ) !!}
{!! Form::email('from_email', get_network_field($network['id'], 'smtp', 'app', 'from_email', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::label('from_name', 'From Name', ['class' => 'form-label'] ) !!}
{!! Form::text('from_name', get_network_field($network['id'], 'smtp', 'app', 'from_name', 'smtps' ), ['class' => 'form-control']) !!}
{!! Form::hidden('id', $network['id'] ) !!} {!! Form::submit('Salva ' . $network['line'], ['class' => 'btn btn-primary btn-fw'] ) !!}
{!! Form::close() !!}
@endforeach
@else {!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal']) !!}
{!! Form::label('host', 'Host', ['class' => 'form-label'] ) !!}
{!! Form::text('host', get_setting('app', 'host', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::label('encryption', 'Encryption', ['class' => 'form-label'] ) !!}
{!! Form::select('encryption', array('none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS'), get_setting('app', 'encryption', 'smtp'), ['class' => 'form-select' ]) !!}
{!! Form::label('port', 'Porta', ['class' => 'form-label'] ) !!}
{!! Form::text('port', get_setting('app', 'port', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::checkbox('autotls', "1", get_setting('app', 'autotls', 'smtp'), ['class' => 'form-check-input', 'id' => 'autotls' ]) !!} {!! Form::label('autotls', 'Auto TLS', ['class' => 'form-check-label'] ) !!}
{!! Form::checkbox('authentication', "1", get_setting('app', 'authentication', 'smtp'), ['class' => 'form-check-input', 'id' => 'authentication' ]) !!} {!! Form::label('authentication', 'Authentication', ['class' => 'form-check-label'] ) !!}
{!! Form::label('username', 'SMTP Username', ['class' => 'form-label'] ) !!}
{!! Form::text('username', get_setting('app', 'username', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::label('password', 'SMTP Password', ['class' => 'form-label'] ) !!}
{!! Form::input('password', 'password', get_setting('app', 'password', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::label('from_email', 'From Email', ['class' => 'form-label'] ) !!}
{!! Form::email('from_email', get_setting('app', 'from_email', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::label('from_name', 'From Name', ['class' => 'form-label'] ) !!}
{!! Form::text('from_name', get_setting('app', 'from_name', 'smtp'), ['class' => 'form-control']) !!}
{!! Form::submit('Salva', ['class' => 'btn btn-primary btn-fw'] ) !!}
{!! Form::close() !!} @endif
@endsection