Changeset 2057


Ignore:
Timestamp:
02/23/10 16:57:37 (14 years ago)
Author:
amuller
Message:

Ticket #921 - Correção de alguns anexos multipart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r2052 r2057  
    909909                                                                $content .= '</table><br>'; 
    910910 
    911                                                                 $content .= $this->decodeBody( 
     911 
     912                                                                $id = ( ( strtolower( $attachment[ 'type' ] ) == 'delivery-status' ) ? false : true ); 
     913                                                                if ( strtolower( $msg->structure[$msg_number]->parts[1]->parts[0]->subtype ) == 'plain' ) 
     914                                                                { 
     915                                                                        $id = !$id; 
     916                                                                        if ( $msg->structure[$msg_number]->parts[1]->parts[0]->encoding == 4 ) 
     917                                                                                $msg->encoding[ $msg_number ][ $values ] = 'quoted-printable'; 
     918                                                                } 
     919 
     920                                                                $body = $this->decodeBody( 
    912921                                                                        imap_fetchbody( 
    913922                                                                                $this->mbox, 
    914923                                                                                $msg_number, 
    915                                                                                 ( $attachment['part_in_msg'] + ( 
    916                                                                                         ( strtolower( $attachment[ 'type' ] ) == 'delivery-status' ) ? 0 : 1 ) 
    917                                                                                 ) . ".1", 
     924                                                                                ( $attachment['part_in_msg'] + ( ( int ) $id ) ) . ".1", 
    918925                                                                                FT_UID 
    919926                                                                        ), 
     
    921928                                                                        $msg->charset[ $msg_number ][ $values ] 
    922929                                                                ); 
     930 
     931                                                                if ( strtolower( $msg->structure[$msg_number]->parts[1]->parts[0]->subtype ) == 'plain' ) 
     932                                                                { 
     933                                                                        $body = str_replace( array( '<', '>' ), array( ' #$<$# ', ' #$>$# ' ), $body ); 
     934                                                                        $body = nl2br( htmlentities( $body ) ); 
     935                                                                        $body = $this -> replace_links( $body ); 
     936                                                                        $body = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $body ); 
     937                                                                        $body = '<span style="font-family: monospace">' . $body . '</span>'; 
     938                                                                } 
     939 
     940                                                                $content .= $body; 
    923941                                                                break; 
    924942                                                        } 
Note: See TracChangeset for help on using the changeset viewer.