[Tickets #13208] [ActiveSync] unable to send email

noreply at bugs.horde.org noreply at bugs.horde.org
Thu May 22 09:47:17 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/13208
------------------------------------------------------------------------------
  Ticket             | 13208
  Created By         | Joerg.Pulz at frm2.tum.de
  Summary            | [ActiveSync] unable to send email
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          | 5.2.0-release
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


Joerg.Pulz at frm2.tum.de (2014-05-22 09:47) wrote:

Hi,

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 at email.android.com>
From: "User" <user at domain.tld>
To: user at 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 at frm2.tum.de

The Horde WebUI displays this correct in the upper right as
     "lastname, firstname" <email address>
  -> e.g. "Pulz, Joerg" <Joerg.Pulz at 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 at frm2.tum.de>"
     }
     ["to"]=>
     array(2) {
       ["h"]=>
       string(2) "To"
       ["v"]=>
       string(22) "Joerg.Pulz at 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 at frm2.tum.de"
     }
     array(2) {
       ["h"]=>
       string(4) "From"
       ["v"]=>
       string(36) "Pulz, Joerg <Joerg.Pulz at 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.





More information about the bugs mailing list