Projects
Kolab:3.4:Updates
kolab-syncroton
kolab-syncroton-2.2.4-fix-from-header-displayna...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kolab-syncroton-2.2.4-fix-from-header-displayname.patch of Package kolab-syncroton (Revision 43)
Currently displaying revision
43
,
Show latest
diff --git a/lib/kolab_sync_message.php b/lib/kolab_sync_message.php index 79ac8d9..77892ee 100644 --- a/lib/kolab_sync_message.php +++ b/lib/kolab_sync_message.php @@ -169,6 +169,22 @@ class kolab_sync_message if (empty($headers['From'])) { $headers['From'] = $this->get_identity(); } + // make sure there's sender name in From: + else if ($rcube->config->get('activesync_fix_from') + && preg_match('/^<?((\S+|("[^"]+"))@\S+)>?$/', trim($headers['From']), $m) + ) { + $identities = kolab_sync::get_instance()->user->list_identities(); + $email = $m[1]; + + foreach ((array) $identities as $ident) { + if ($ident['email'] == $email) { + if ($ident['name']) { + $headers['From'] = format_email_recipient($email, $ident['name']); + } + break; + } + } + } if (empty($headers['Message-ID'])) { $headers['Message-ID'] = $rcube->gen_message_id();
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.