| Summary | [ActiveSync] unable to send email |
| Queue | Synchronization |
| Queue Version | Git master |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | mrubinsk (at) horde (dot) org |
| Requester | Joerg.Pulz (at) frm2 (dot) tum (dot) de |
| Created | 05/22/2014 (4188 days ago) |
| Due | |
| Updated | 05/23/2014 (4187 days ago) |
| Assigned | |
| Resolved | 05/23/2014 (4187 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | 5.2.0-release |
| Patch | Yes |
State ⇒ Resolved
commit da97928eba951fa6d34a0d891fd821abe5f84826
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Fri May 23 15:59:34 2014 -0400
Bug: 13208Fix generating From: address..../Core/lib/Horde/Core/ActiveSync/Driver.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/da97928eba951fa6d34a0d891fd821abe5f84826
Priority ⇒ 2. Medium
Patch ⇒ Yes
Milestone ⇒ 5.2.0-release
Queue ⇒ Synchronization
Summary ⇒ [ActiveSync] unable to send email
Type ⇒ Bug
State ⇒ Unconfirmed
with recent horde-5.2.0-git - Horde_ActiveSync-2.16.2 (pulled from
github) i can no longer send emails from my Android.
Android phone is connected using ActiveSync. Receiving email, syncing
calendar, contacts, tasks and notes works fine.
When i try to send an email from Android this email stays in the
outbox forever and the "sync circle" is turning forever too.
The eMail never reaches horde or the smtp server.
Detailed log (with Wbxml) when sending mail:
2014-05-19T14:24:08+02:00 INFO: [42509] Handling SENDMAIL command with Wbxml.
2014-05-19T14:24:08+02:00 DEBUG: [42509] I <ComposeMail:SendMail>
2014-05-19T14:24:08+02:00 DEBUG: [42509] I <ComposeMail:ClientId>
2014-05-19T14:24:08+02:00 DEBUG: [42509] I SendMail-2667454925789
2014-05-19T14:24:08+02:00 DEBUG: [42509] I </ComposeMail:ClientId>
2014-05-19T14:24:08+02:00 DEBUG: [42509] I <ComposeMail:SaveInSentItems />
2014-05-19T14:24:08+02:00 DEBUG: [42509] I <ComposeMail:MIME>
2014-05-19T14:24:08+02:00 DEBUG: [42509] I Date: Mon, 19 May 2014
14:24:07 +0200
Subject: Testmail
Message-ID: <cybh7yw6yxoyfnjvu9s5qxrb.1400502247419@email.android.com>
From: "User" <user@domain.tld>
To: user@domain.tld
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
VGVzdA==
2014-05-19T14:24:08+02:00 DEBUG: [42509] I </ComposeMail:MIME>
2014-05-19T14:24:08+02:00 DEBUG: [42509] I </ComposeMail:SendMail>
2014-05-19T14:24:08+02:00 ERR: Address is missing domain.
Identity is correctly set up.
For our setup every default identity is in the form
lastname, firstname
-> e.g. Pulz, Joerg
In the Full name field of the identity: Pulz, Joerg
In the default e-mail address field: Joerg.Pulz@frm2.tum.de
The Horde WebUI displays this correct in the upper right as
"lastname, firstname" <email address>
-> e.g. "Pulz, Joerg" <Joerg.Pulz@frm2.tum.de>
With some additional debug in Horde_Core_ActiveSync_Driver::sendMail()
i tracked this down and think it's most probably commit
07bdf1e2734fbf8dc876c896315375d13c0311a6.
When i try to send an email using ActiveSync i get the following
headers from the device
["from"]=>
array(2) {
["h"]=>
string(4) "From"
["v"]=>
string(33) ""Pulz, Joerg" <jpulz@frm2.tum.de>"
}
["to"]=>
array(2) {
["h"]=>
string(2) "To"
["v"]=>
string(22) "Joerg.Pulz@frm2.tum.de"
}
Right after this part of code in Horde_Core_ActiveSync_Driver::sendMail()
1855 // Always add From: since we allow selecting the identity.
1856 $headers->removeHeader('From');
1857 $headers->addHeader('From', $this->_getIdentityFromAddress());
i get the following headers
["to"]=>
array(2) {
["h"]=>
string(2) "To"
["v"]=>
string(22) "Joerg.Pulz@frm2.tum.de"
}
array(2) {
["h"]=>
string(4) "From"
["v"]=>
string(36) "Pulz, Joerg <Joerg.Pulz@frm2.tum.de>"
}
As you can see, the double quotes around the fullname are missing,
which at the end leads to my error "Address is missing domain".
For now i just modified
Horde_Core_ActiveSync_Driver::_getIdentityFromAddress() to return
explicit double quotes around the fullname
return '"' . $name . '" <' . $from_addr . '>';
instead of
return $name . ' <' . $from_addr . '>';
This solves my problem for now and i can send email using ActiveSync,
but i think this is absolutely a hack and no clean solution as it's
not required for fullnames that don't contain a comma.
A better and official fix for this problem is much appreciated.