[imp] Blank emails

Tomi Orava Tomi.Orava at ncircle.nullnet.fi
Sat Dec 29 17:56:24 UTC 2012


Quoting Tomi Orava <Tomi.Orava at ncircle.nullnet.fi>:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Simon Brereton <simon.buongiorno at gmail.com>> On 19 December  
>> 2012 14:21,  <mrubinsk at horde.org> wrote:
>>>> Quoting Simon Brereton <simon.buongiorno at gmail.com>
>>>>
>>>>
>>>> On Dec 19, 2012 2:03 PM, <mrubinsk at horde.org> wrote:
>>>>>
>>>>> Quoting Simon Brereton <simon.buongiorno at gmail.com>> Hi
>>>>>>
>>>>>>
>>>>>> I've googled with no success.
>>>>>>
>>>>>> I'm running Horde5/Imp6 in testing - everything was going well, but
>>>>>> lately
>>>>>> emails sent from my Android device are empty.  I.e. the recipient
>>>>>> receives
>>>>>> it, but there is no new text (the replied-to text is there).
>>>>>>
>>>>>> In the sent folder on the phone the entire message appears blank.  I'm
>>>>>> not
>>>>>> able to check through imp yet.
>>>>>>
>>>>>> I haven't updated anything that could have caused this (although
>>>>>> doubtless
>>>>>> updating might fix it), but I wanted to know if anyone else has had this
>>>>>> issue.
>>>>>>
>>>>>> Simon
>>>>>> --
>>>>>> imp mailing list
>>>>>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>>>>>> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>>>>>>
>>>>> You say sent from Android; How are you sending them? IMAP client, mobile
>>>>> IMP view, active sync?
>>>>
>>>> Sorry, activesync.  IMAP works fine and always has done.  Have never tried
>>>> mobile imp.
>>>>
>>>> Simon
>>>>
>>>>
>>>>
>>>> These problems sound similar to some issues that have been fixed  
>>>> in the last
>>>> few pear releases. Are you sure you are using the most up to date  
>>>> packages?
>>>
>>> Hi Mike
>>>
>>> No, I haven't upgraded since I installed it.  I'm curious to know why
>>> it would have worked and now doesn't.  I will try to update during the
>>> holiday downtime.
>>>
>>> FYI - IMP shows the message with "There are no parts that can be
>>> displayed inline".  Which is weird since the recipient (including me
>>> if I put myself in BCC) will see the entire quoted message - just not
>>> the new response.
>>>
>>> Cheers
>>>
>>> Simon
>>>
>> Does this happen with all replied emails or only some?
>
> I actually just ran a git bisect due to same symptoms.
> The result was that the following commit breaks horde on
> my Samsung Galaxy S3 phone. The problem only comes up with
> HTML-mails that have been received by the phone after the below
> commits has been applied. All the previous mails are of course
> just fine.

And to clarify a bit, my problem was seen whenever
I _received_ and html email via activesync to my android phone.
All the plain text emails were being displayed just fine, while
the html mails were always completely blank. I rarely send
emails (and never send html mails) so it still might be the very
same issue.

Tomi Orava


>
>
> git show -p e27548d3bf5f943981e23a7ac769494776ac3dfd
> commit e27548d3bf5f943981e23a7ac769494776ac3dfd
> Author: Michael J Rubinsky <mrubinsk at horde.org>
> Date:   Mon Dec 17 19:16:54 2012 -0500
>
>     Cannot truncate HTML data while fetching either.
>
> diff --git  
> a/framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php  
> b/framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php
> index 8cf75a8..a2e2f6b 100644
> --- a/framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php
> +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php
> @@ -246,7 +246,6 @@ class Horde_ActiveSync_Imap_Message
>              $html_query_opts = $body_query_opts;
>              if (!empty($html_id)) {
>                  if  
> (isset($options['bodyprefs'][Horde_ActiveSync::BODYPREF_TYPE_HTML]['truncationsize']))  
> {
> -                    $html_query_opts['length'] =  
> $options['bodyprefs'][Horde_ActiveSync::BODYPREF_TYPE_HTML]['truncationsize'];
>                      $query->bodyPartSize($html_id);
>                  }
>                  $query->bodyPart($html_id, $html_query_opts);
> @@ -307,14 +306,24 @@ class Horde_ActiveSync_Imap_Message
>                  'size' => $text_size));
>          }
>          if (!empty($html_id)) {
> -            $html_body_part->setContents($data->getBodyPart($html_id));
> -            $html = $html_body_part->getContents();
> -            if (isset($html_query_opts['length'])) {
> -                $html_size =  
> !is_null($data->getBodyPartSize($html_id)) ?  
> $data->getBodyPartSize($html_id) : strlen($html);
> +            $html = $data->getBodyPart($html_id);
> +            if (!$data->getBodyPartDecode($html_id)) {
> +                $html_body_part->setContents($html);
> +                $html = $html_body_part->getContents();
>              } else {
> -                $html_size = strlen($html);
> +                $html = $html_body_part->getContents();
>              }
> -            $truncated = $html_size > strlen($html);
> +            // HTML truncation
> +            if  
> (!empty($options['bodyprefs'][Horde_ActiveSync::BODYPREF_TYPE_HTML]['truncationsize']))  
> {
> +                $html = Horde_String::substr(
> +                    $html,
> +                    0,
> +                     
> $options['bodyprefs'][Horde_ActiveSync::BODYPREF_TYPE_HTML]['truncationsize'],  
> $html_charset);
> +            }
> +            $html_size = !is_null($data->getBodyPartSize($html_id)) ?
> +                $data->getBodyPartSize($html_id) :
> +                Horde_String::length($html);
> +            $truncated = $html_size > Horde_String::length($html);
>              if ($version >= Horde_ActiveSync::VERSION_TWELVE &&
>                  !($truncated &&  
> $options['bodyprefs'][Horde_ActiveSync::BODYPREF_TYPE_HTML]['allornone']))  
> {
>                  $return['html'] = array(
>
> My bisect log is here:
>
> git bisect start
> # bad: [3096e6e8915a98258554192f029a8d070c4f15eb] Development mode  
> for Horde_ActiveSync-2.0.15
> git bisect bad 3096e6e8915a98258554192f029a8d070c4f15eb
> # good: [e813ee5a85abc0a9a0aeada5ca417fea30ee8197] Use Horde_Url::link().
> git bisect good e813ee5a85abc0a9a0aeada5ca417fea30ee8197
> # good: [b6cf65c8803c39414f9f2295c9baa8d3392feaa8] Solution (at  
> least partial) for bug #11658 Fatal error editing date property.
> git bisect good b6cf65c8803c39414f9f2295c9baa8d3392feaa8
> # bad: [91c3666f133ad96cd15cf24ee3e881130458e1e6] [mms] Convert  
> Horde_String#validUtf8() from a preg-regex to a string iterator to  
> eliminate PCRE issues relating to stack sizes (Bug #11899).
> git bisect bad 91c3666f133ad96cd15cf24ee3e881130458e1e6
> # good: [0849f97ba3091caa79097744bd76f0ac37939dba] phpdoc
> git bisect good 0849f97ba3091caa79097744bd76f0ac37939dba
> # good: [37860364e2a9324437e84062265bedbde12eed08] [mms] Fix  
> duplicate signature being added to compose messages in minimal view  
> (Bug #11896; Thomas Jarosch <thomas.jarosch at intra2net.com>).
> git bisect good 37860364e2a9324437e84062265bedbde12eed08
> # bad: [c19f7041c32fa5e4e00949e413221a5799cea54e] Correctly pass the  
> mime support flag to the ITEMOPERATIONS request.
> git bisect bad c19f7041c32fa5e4e00949e413221a5799cea54e
> # bad: [e27548d3bf5f943981e23a7ac769494776ac3dfd] Cannot truncate  
> HTML data while fetching either.
> git bisect bad e27548d3bf5f943981e23a7ac769494776ac3dfd
> # good: [685ad1335066a14e2b7d12dd63e1bfa185d0424a] Prepare for 2.4.0 release
> git bisect good 685ad1335066a14e2b7d12dd63e1bfa185d0424a
> # good: [8d6f8f4cbaa8404f61bafa05e42987164a6b0c6b] Development mode  
> for Horde_Imap_Client-2.4.1
> git bisect good 8d6f8f4cbaa8404f61bafa05e42987164a6b0c6b
>
> Tomi Orava
>
> -- 
> imp mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org





More information about the imp mailing list