<path>civicrm/admin/mailSettings</path>
<title>Mail Accounts</title>
<page_callback>CRM_Admin_Page_MailSettings</page_callback>
- <desc>Configure email account setting.</desc>
+ <desc>List email accounts.</desc>
<access_arguments>access CiviCRM,access CiviMail</access_arguments>
<adminGroup>CiviMail</adminGroup>
<weight>420</weight>
</item>
+ <item>
+ <path>civicrm/admin/mailSettings/edit</path>
+ <title>Mail Accounts</title>
+ <page_callback>CRM_Admin_Form_MailSettings</page_callback>
+ <access_arguments>access CiviCRM,access CiviMail</access_arguments>
+ <weight>420</weight>
+ </item>
<item>
<path>civicrm/admin/setting/preferences/mailing</path>
<title>CiviMail Component Settings</title>
--- /dev/null
+<?php
+
+use CRM_CivicrmAdminUi_ExtensionUtil as E;
+
+return [
+ [
+ 'name' => 'SavedSearch_Mail_Accounts',
+ 'entity' => 'SavedSearch',
+ 'cleanup' => 'always',
+ 'update' => 'unmodified',
+ 'params' => [
+ 'version' => 4,
+ 'values' => [
+ 'name' => 'Mail_Accounts',
+ 'label' => E::ts('Mail Accounts'),
+ 'form_values' => NULL,
+ 'mapping_id' => NULL,
+ 'search_custom_id' => NULL,
+ 'api_entity' => 'MailSettings',
+ 'api_params' => [
+ 'version' => 4,
+ 'select' => [
+ 'name',
+ 'server',
+ 'username',
+ 'localpart',
+ 'domain',
+ 'return_path',
+ 'protocol:label',
+ 'source',
+ 'is_ssl',
+ 'is_default',
+ ],
+ 'orderBy' => [],
+ 'where' => [],
+ 'groupBy' => [],
+ 'join' => [],
+ 'having' => [],
+ ],
+ 'expires_date' => NULL,
+ 'description' => NULL,
+ ],
+ 'match' => [
+ 'name',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'SavedSearch_Mail_Accounts_SearchDisplay_Mail_Accounts_Table_1',
+ 'entity' => 'SearchDisplay',
+ 'cleanup' => 'always',
+ 'update' => 'unmodified',
+ 'params' => [
+ 'version' => 4,
+ 'values' => [
+ 'name' => 'Mail_Accounts_Table_1',
+ 'label' => E::ts('Mail Accounts Table 1'),
+ 'saved_search_id.name' => 'Mail_Accounts',
+ 'type' => 'table',
+ 'settings' => [
+ 'description' => NULL,
+ 'sort' => [],
+ 'limit' => 50,
+ 'pager' => [],
+ 'placeholder' => 5,
+ 'columns' => [
+ [
+ 'type' => 'field',
+ 'key' => 'name',
+ 'dataType' => 'String',
+ 'label' => E::ts('Name'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'server',
+ 'dataType' => 'String',
+ 'label' => E::ts('Server'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'username',
+ 'dataType' => 'String',
+ 'label' => E::ts('Username'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'localpart',
+ 'dataType' => 'String',
+ 'label' => E::ts('Localpart'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'domain',
+ 'dataType' => 'String',
+ 'label' => E::ts('Domain'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'return_path',
+ 'dataType' => 'String',
+ 'label' => E::ts('Return-Path'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'protocol:label',
+ 'dataType' => 'String',
+ 'label' => E::ts('Protocol'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'source',
+ 'dataType' => 'String',
+ 'label' => E::ts('Mail Folder'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'field',
+ 'key' => 'is_ssl',
+ 'dataType' => 'Boolean',
+ 'label' => E::ts('Use SSL?'),
+ 'sortable' => TRUE,
+ ],
+ [
+ 'type' => 'html',
+ 'key' => 'is_default',
+ 'dataType' => 'Boolean',
+ 'label' => E::ts('Used For'),
+ 'sortable' => TRUE,
+ 'rewrite' => '{if "[is_default]" == "' . E::ts('Yes') . '"}' . E::ts('Bounce Processing <strong>(Default)</strong>') . '{else}' . E::ts('Email-to-Activity') . '{/if}',
+ ],
+ [
+ 'text' => '',
+ 'style' => 'default',
+ 'size' => 'btn-xs',
+ 'icon' => 'fa-bars',
+ 'links' => [
+ [
+ 'entity' => 'MailSettings',
+ 'action' => 'update',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-pencil',
+ 'text' => E::ts('Edit'),
+ 'style' => 'default',
+ 'path' => '',
+ 'condition' => [],
+ ],
+ [
+ 'entity' => 'MailSettings',
+ 'action' => 'delete',
+ 'join' => '',
+ 'target' => 'crm-popup',
+ 'icon' => 'fa-trash',
+ 'text' => E::ts('Delete'),
+ 'style' => 'danger',
+ 'path' => '',
+ 'condition' => [
+ 'is_default',
+ '=',
+ FALSE,
+ ],
+ ],
+ ],
+ 'type' => 'menu',
+ 'alignment' => 'text-right',
+ ],
+ ],
+ 'actions' => FALSE,
+ 'classes' => [
+ 'table',
+ 'table-striped',
+ ],
+ 'addButton' => [
+ 'path' => 'civicrm/admin/mailSettings/edit?action=add&reset=1',
+ 'text' => E::ts('Add Mail Account'),
+ 'icon' => 'fa-plus',
+ ],
+ ],
+ 'acl_bypass' => FALSE,
+ ],
+ 'match' => [
+ 'name',
+ 'saved_search_id',
+ ],
+ ],
+ ],
+];