Skip to content

Commit

Permalink
Fix limiting To: field length.
Browse files Browse the repository at this point in the history
Not sure where the 1024 value came from, but documents currently
state it's limited to 32768 characters.
  • Loading branch information
mrubinsk committed Nov 6, 2014
1 parent 7f2a47a commit 9afe5dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php
Expand Up @@ -922,11 +922,11 @@ protected function _buildMailMessage(
$imap_message = new Horde_ActiveSync_Imap_Message($imap, $mbox, $data);
$eas_message = Horde_ActiveSync::messageFactory('Mail');

// Build To: data (POOMMAIL_TO has a max length of 1024).
// Build To: data (POOMMAIL_TO has a max length of 32768).
$to = $imap_message->getToAddresses();
$eas_message->to = array_pop($to['to']);
foreach ($to['to'] as $to_atom) {
if (strlen($eas_message->to) + strlen($to_atom) > 1024) {
if (strlen($eas_message->to) + strlen($to_atom) > 32768) {
break;
}
$eas_message->to .= ',' . $to_atom;
Expand Down

0 comments on commit 9afe5dd

Please sign in to comment.