% layout 'AdminLTE', title => "Sme server 2 - emaildeliver";

% content_for 'module' => begin

<div class="card-body">

    % if (config->{debug} == 1) {
    <p>
    %= dumper $c->current_route
    %= dumper $mai_datas
    </p>
    % }
    
    % if ( stash 'error' ) {
        <br>
        <div class="">
        %= $c->render_to_string(inline => stash 'error') 
        </div>
    %}

    <h1><%= $title%></h1>

    %= form_for '/emailsettingd' => (method => 'POST') => begin

    <h2>
    %=l 'mai_TITLE_UNKNOWN'
    </h2>

    %=l 'mai_DESC_UNKNOWN'

    <p>
    <span class="">
    %=l 'mai_LABEL_UNKNOWN'
    </span>
    <span class="">
    % param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser';
    %= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => ""
    </span>
    </p>

    <!--<hr class="" />-->
    <h2>
    %=l 'mai_TITLE_DELEGATE'
    </h2>

    %=l 'mai_DESC_DELEGATE'

    <p>
    <span class="">
    %=l 'mai_LABEL_DELEGATE'
    </span>
    <span class="">
    % param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer';
    %= text_field 'DelegateMailServer', class => ""
    </span>
    </p>

    <!--<hr class="" />-->
    <h2>
    %=l 'mai_TITLE_SMARTHOST'
    </h2>

    %=l 'mai_DESC_SMARTHOST'

    <p>
    <span class="">
    %=l 'mai_LABEL_SMARTHOST'
    </span>
    <span class="">
    % param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost';
    %= text_field 'SMTPSmartHost', class => ""
    </span>
    </p>

    <p>
    <span class="">
    %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
    </span>
    <span class="">
    % param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
    %= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => ""
    </span>
    </p>

    <p>
    <span class="">
    %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
    </span>
    <span class="">
    % param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
    %= text_field 'SMTPAUTHPROXY_Userid', class => ""
    </span>
    </p>

    <p>
    <span class="">
    %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
    </span>
    <span class="">
    % param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
    %= password_field 'SMTPAUTHPROXY_Passwd', class => ""
    </span>
    </p>

    %   my $btn = l('SAVE');
    %= submit_button "$btn", class => ""

    %= hidden_field 'trt' => 'DEL'
    % end    

</div>
%end