roundcubemail/plugins/managesieve/managesieve.php
private function parse_headers($headers)
    {
        $result = array();

        if ($headers->subject)
            $result[] = array('Subject', rcube_mime::decode_header($headers->subject));

        // @TODO: List-Id, others?
        foreach (array('From', 'To') as $h) {
            $hl = strtolower($h);
            if ($headers->$hl) {
                $list = rcube_mime::decode_address_list($headers->$hl);
                foreach ($list as $item) {
                    if ($item['mailto']) {
                        $result[] = array($h, $item['mailto']);
                    }
                }
            }
        }

        return $result;
    }
private function parse_headers($headers)
    {
        $result = array();

        if ($headers->subject)
            $result[] = array('Subject', rcube_mime::decode_header($headers->subject));

        // @TODO: List-Id, others?
        foreach (array('From', 'To') as $h) {
            $hl = strtolower($h);
            if ($headers->$hl) {
                $list = rcube_mime::decode_address_list($headers->$hl);
                foreach ($list as $item) {
                    if ($item['mailto']) {
                        $result[] = array($h, $item['mailto']);
                    }
                }
            }
        }

        return $result;
    }
private function parse_headers ( $ headers ) { $ result = array ( ) ; if ( $ headers -> subject ) $ result [ ] = array ( 'Subject' , rcube_mime :: decode_header ( $ headers -> subject ) ) ; // @TODO: List-Id, others? foreach ( array ( 'From' , 'To' ) as $ h ) { $ hl = strtolower ( $ h ) ; if ( $ headers -> $ hl ) { $ list = rcube_mime :: decode_address_list ( $ headers -> $ hl ) ; foreach ( $ list as $ item ) { if ( $ item [ 'mailto' ] ) { $ result [ ] = array ( $ h , $ item [ 'mailto' ] ) ; } } } } return $ result ; }
Extract mail headers for new filter form
Extract mail headers for new filter form