<div class="row">
  <div class="col-xs-4">
    <translate>portals.sendmail.servertype</translate>
  </div>
  <div class="col-xs-8">
    <select
      ng-model="cfg.sendMailServerType"
      ng-change="serverTypeChanged('{{cfg}}')"
      class="form-control"
    >
      <option value=""> ---- </option>
      <option value="smtp">SMTP</option>
    </select>
  </div>
</div>

<table ng-show="cfg.sendMailServerType.length!=0" style="border-spacing: 2px;">
  <tr>
    <td>
      <translate>portals.sendmail.host</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <input ng-model="edit_resource.sendMailCfg.smtpMailHost" />
    </td>
  </tr>
  <tr>
    <td>
      <translate>portals.sendmail.port</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <input ng-model="edit_resource.sendMailCfg.smtpMailPort" type="number" />
    </td>
  </tr>
  <tr>
    <td>
      <translate>portals.sendmail.mailFrom</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <input ng-model="edit_resource.sendMailCfg.mailFrom" type="email" />
    </td>
  </tr>
  <tr>
    <td>
      <translate>portals.sendmail.starttls</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <select ng-model="edit_resource.sendMailCfg.starttls">
        <option value="true">{{ 'common.yes' | translate }}</option>
        <option value="false">{{ 'common.no' | translate }}</option>
      </select>
    </td>
  </tr>
  <tr>
    <td>
      <translate>portals.sendmail.secured</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <select ng-model="edit_resource.sendMailCfg.secured">
        <option value="true">{{ 'common.yes' | translate }}</option>
        <option value="false">{{ 'common.no' | translate }}</option>
      </select>
    </td>
  </tr>
  <tr>
    <td>
      <translate>portals.sendmail.auth</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <select ng-model="edit_resource.sendMailCfg.smtpAuth">
        <option value="true">{{ 'common.yes' | translate }}</option>
        <option value="false">{{ 'common.no' | translate }}</option>
      </select>
    </td>
  </tr>
  <tr ng-show="edit_resource.sendMailCfg.smtpAuth=='true'">
    <td>
      <translate>portals.sendmail.user</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <input ng-model="edit_resource.sendMailCfg.smtpUser" />
    </td>
  </tr>
  <tr ng-show="edit_resource.sendMailCfg.smtpAuth=='true'">
    <td>
      <translate>portals.sendmail.pwd</translate>
    </td>
    <td style="width:5px;">
      &nbsp;
    </td>
    <td>
      <input ng-model="edit_resource.sendMailCfg.smtpPwd" type="password" />
    </td>
  </tr>
</table>
