Summary | sending mail via AcitveSync fails if addresses contains german umlauts |
Queue | Synchronization |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | j.goepfert (at) gmx (dot) de |
Created | 01/02/2013 (4611 days ago) |
Due | |
Updated | 01/15/2013 (4598 days ago) |
Assigned | 01/04/2013 (4609 days ago) |
Resolved | 01/15/2013 (4598 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
worked. i checked the Core/ActiveSync/Driver.php for a call something
linke "->toArray(array('charset' => 'UTF-8'))", but there was not
something like that. i checked the file in the git-repo and noticed a
lot of changes.
i am not sure but i believe your changes
(f309400f86940b7bc74ca48472420464d08bbf7b) did it.
i upgraded horde and now it works.
Thanks for your patience. issue can be closed.
Jens
Horde_Mime_Headers->toArray() should properly encode it anyway. What
does the following output for you?
$hdr = new Horde_Mime_Headers();
$hdr->addHeader('To', 'Michael Rübinsky <mrubinsk@horde.org>');
var_dump($hdr->toArray(array('charset' => 'UTF-8')));
For me, it correctly outputs the following for the "To" value:
"Michael =?utf-8?b?UsO8Ymluc2t5?= <mrubinsk@horde.org>"
If this doesn't work for you, then either your git checkout is not up
to date, or your php is broken.
that your client is sending it incorrectly. What AS client are you
using?
For reference, sending an email to Michael Rübinsky
<mike@theupstairsroom.com> results in the following at the same debug
point you used:
string(59) "Michael =?utf-8?b?UsO8Ymluc2t5?= <mike@theupstairsroom.com>"
i added some debug output to Transport.php (line 183) to see what the
content of the variable $recipients is, which is passed to the
parseAddressList function.
$recipients = "Günter <jens@sg-dev.de>";
So i created a litte demo script called test.php:
<?php
include 'Rfc822.php';
include 'Exception2.php';
include 'Rfc822/Object.php';
include 'Rfc822/Address.php';
include 'Rfc822/List.php';
$rfc822 = new Horde_Mail_Rfc822();
$recipients = "Günter <jens@sg-dev.de>";
$addresses = $rfc822->parseAddressList($recipients, array('validate'
=> true));
?>
The same exception like in my log file is thrown. calling with
$recipients = "Gunter <jens@sg-dev.de>"; works.
Note: in my test script i included Exception2.php which i copied from
Exception.php and changed it to:
class Horde_Mail_Exception extends Exception
{
}
So i do not have any Horde dependencies to get my test script executable.
Queue ⇒ Synchronization
State ⇒ Feedback
Assigned to Michael Rubinsky
What is the exact email address that is causing validation to fail?
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ sending mail via AcitveSync fails if addresses contains german umlauts
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
fails. This happens for the "From"-address and for the
recipient-addresses. Sending without umlauts works fine.
The active sync log contains the following enries:
2013-01-02T14:08:59+00:00 INFO: Request being handled for device:
androidc1264404651 Supporting protocol version: 12.1
2013-01-02T14:08:59+00:00 INFO: [androidc1264404651] Handling SendMail
command.
2013-01-02T14:08:59+00:00 ERR: Error when parsing address list.
2013-01-02T14:08:59+00:00 ERR: exception 'Horde_Mail_Exception' with
message 'Error when parsing address list.' in
/var/www/horde5/pear/php/Horde/Mail/Rfc822.php:261
Stack trace:
#0 /var/www/horde5/pear/php/Horde/Mail/Rfc822.php(164):
Horde_Mail_Rfc822->_parseAddressList()
#1/var/www/horde5/pear/php/Horde/Mail/Transport.php(186):Horde_Mail_Rfc822->parseAddressList('Jens G??pfert <...', Array)
#2/var/www/horde5/pear/php/Horde/Mail/Transport/Smtp.php(222):Horde_Mail_Transport->parseRecipients('Jens G??pfert <...')
#3/var/www/horde5/pear/php/Horde/Core/ActiveSync/Driver.php(1085):Horde_Mail_Transport_Smtp->send('Jens G??pfert <...', Array, Resource
id
#262)#4/var/www/horde5/pear/php/Horde/ActiveSync/Request/SendMail.php(54):Horde_Core_ActiveSync_Driver->sendMail(Resource id
#242, false, false,false, true)
#5/var/www/horde5/pear/php/Horde/ActiveSync/Request/Base.php(213):Horde_ActiveSync_Request_SendMail->_handle()
#6/var/www/horde5/pear/php/Horde/ActiveSync.php(639):Horde_ActiveSync_Request_Base->handle()
#7/var/www/horde5/pear/php/Horde/Rpc/ActiveSync.php(150):Horde_ActiveSync->handleRequest('SendMail', 'androidc1264404...')
#8/var/www/horde5/rpc.php(155): Horde_Rpc_ActiveSync->getResponse(NULL)#9{main}2013-01-02T14:08:59+00:00 ERR: exception 'Horde_Mail_Exception' with
message 'Error when parsing address list.' in
/var/www/horde5/pear/php/Horde/Mail/Rfc822.php:261
Stack trace:
#0 /var/www/horde5/pear/php/Horde/Mail/Rfc822.php(164):
Horde_Mail_Rfc822->_parseAddressList()
#1/var/www/horde5/pear/php/Horde/Mail/Transport.php(186):Horde_Mail_Rfc822->parseAddressList('Jens G??pfert <...', Array)
#2/var/www/horde5/pear/php/Horde/Mail/Transport/Smtp.php(222):Horde_Mail_Transport->parseRecipients('Jens G??pfert <...')
#3/var/www/horde5/pear/php/Horde/Core/ActiveSync/Driver.php(1085):Horde_Mail_Transport_Smtp->send('Jens G??pfert <...', Array, Resource
id
#262)#4/var/www/horde5/pear/php/Horde/ActiveSync/Request/SendMail.php(54):Horde_Core_ActiveSync_Driver->sendMail(Resource id
#242, false, false,false, true)
#5/var/www/horde5/pear/php/Horde/ActiveSync/Request/Base.php(213):Horde_ActiveSync_Request_SendMail->_handle()
#6/var/www/horde5/pear/php/Horde/ActiveSync.php(639):Horde_ActiveSync_Request_Base->handle()
#7/var/www/horde5/pear/php/Horde/Rpc/ActiveSync.php(150):Horde_ActiveSync->handleRequest('SendMail', 'androidc1264404...')
#8/var/www/horde5/rpc.php(155): Horde_Rpc_ActiveSync->getResponse(NULL)#9{main}2013-01-02T15:09:04+01:00 DEBUG: [27658] Initializing state for
collection: INBOX, synckey: {50bc7406-5c54-4dfb-a993-14613e4b951e}493
2013-01-02T15:09:04+01:00 DEBUG: [27658] Loading state for synckey
{50bc7406-5c54-4dfb-a993-14613e4b951e}493