Add "Org | Name Email" as email identity format into identLabel preference options

This commit is contained in:
Hadi Nategh 2021-12-10 10:41:04 +01:00
parent 684d0846dc
commit ebf4ca8752
2 changed files with 12 additions and 1 deletions

View File

@ -469,7 +469,8 @@ class mail_hooks
1 => lang('Real name'),
2 => lang('Email'),
4 => lang('Organization'),
8 => lang('Ident name')
8 => lang('Ident name'),
16 => lang('Organization | Real name Email')
),
'default' => 7
),

View File

@ -46,6 +46,11 @@ class mail_tree
*/
const IDENT_NAME_IDENTITY= 8;
/**
* bit flag: org | name email
*/
const ORG_NAME_EMAIL = 16;
/**
* Icons used for nodes different states
*
@ -560,6 +565,11 @@ class mail_tree
$name[] = $_account['ident_org'];
}
if ($identLabel & self::ORG_NAME_EMAIL)
{
$name[] = $_account['ident_org']." | ".$_account['ident_realname'].' '.' <'.$_account['ident_email'].'>';
}
if ($identLabel & self::IDENT_EMAIL || empty($name))
{
if (strpos($_account['ident_email'], '@') !== false || trim($_account['ident_email']) !='')