From 760bd4106ff84fe5e1605c70f5d579e916162519 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 12 Dec 2016 09:35:52 +0100 Subject: [PATCH] * Mail: Fix accounts selectbox in compose dialog does not include email addresses. Additionally, let local accounts without '@' get explicitly displayed in accounts selectbox. --- api/src/Mail/Account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index 3b151a7da3..fe3a3cf1e2 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -1607,11 +1607,11 @@ class Account implements \ArrayAccess { $name = $account['acc_name']; } - if (!trim($account['ident_email'])) + if (strpos($account['ident_email'], '@') !== false || !trim($account['ident_email'])) { $name .= ' <'.$account['ident_email'].'>'; } - elseif(!trim($account['acc_imap_username'])) + elseif(strpos($account['acc_imap_username'], '@') !== false || !trim($account['acc_imap_username'])) { $name .= ' <'.$account['acc_imap_username'].'>'; }