From ebf4ca8752f07ea01723be18532d7f9cb1d7bb54 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 10 Dec 2021 10:41:04 +0100 Subject: [PATCH 1/3] Add "Org | Name Email" as email identity format into identLabel preference options --- mail/inc/class.mail_hooks.inc.php | 3 ++- mail/inc/class.mail_tree.inc.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 2d6eeb1eb5..a71b801ffa 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -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 ), diff --git a/mail/inc/class.mail_tree.inc.php b/mail/inc/class.mail_tree.inc.php index 22350398b9..c288c8a37e 100644 --- a/mail/inc/class.mail_tree.inc.php +++ b/mail/inc/class.mail_tree.inc.php @@ -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']) !='') From 84b81cb1f3cdcb59fa9960d3fbe019761b66e8d4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 10 Dec 2021 13:42:10 +0100 Subject: [PATCH 2/3] Set From identity base on identLabel preference --- mail/inc/class.mail_compose.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 04a048d261..7021280e25 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -2463,7 +2463,7 @@ class mail_compose $email_From = $_identity['ident_email'] ? $_identity['ident_email'] : $activeMailProfile['ident_email']; // Try to fix identity email with no domain part set $_mailObject->setFrom(Mail::fixInvalidAliasAddress(Api\Accounts::id2name($_identity['account_id'], 'account_email'), $email_From), - Mail::generateIdentityString($_identity,false)); + mail_tree::getIdentityName($_identity)); $_mailObject->addHeader('X-Priority', $_formData['priority']); $_mailObject->addHeader('X-Mailer', 'EGroupware-Mail'); From 476f8b671ff76ac1ee11834029eedf0d84fcde8a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 10 Dec 2021 14:48:40 +0100 Subject: [PATCH 3/3] Make mail's receive notification action icon colorful when it's being selected --- mail/inc/class.mail_compose.inc.php | 2 +- .../pixelegg/images/notification.svg | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 mail/templates/pixelegg/images/notification.svg diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 7021280e25..069eb03bf3 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -191,7 +191,7 @@ class mail_compose ), 'disposition' => array( 'caption' => 'Notification', - 'icon' => 'notification_message', + 'icon' => 'notification', 'group' => ++$group, 'checkbox' => true, 'hint' => 'check to receive a notification when the message is read (note: not all clients support this and/or the receiver may not authorize the notification)', diff --git a/mail/templates/pixelegg/images/notification.svg b/mail/templates/pixelegg/images/notification.svg new file mode 100644 index 0000000000..a7ea8d30e6 --- /dev/null +++ b/mail/templates/pixelegg/images/notification.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + +