Problem With Eimap Extension

Hi everybody, Nowadays I’m developing an app where I can retrieve emails and I’m using EImap extension (Extension Page) , but it seems that something is going wrong. I’m applying the exact code from the page, but the result is a blank page, why? If anyone could help me please, I’ll be very thankful.

By the way, the code I’m using is this (exactly):

Yii::import('ext.EImap.EIMap', true);

        $imap = new EIMap('{}/imap/ssl/novalidate-cert}INBOX', '', 'mypassword');



            // we are set lets search for unseen

            $unseen = $imap->searchmails( EIMap::SEARCH_UNSEEN );

            if($unseen && is_array($unseen)) // do we have any?


                // put new ones first


                foreach($unseen as $msgId)


                    $mail = $imap->getMail( $msgId );

                    echo '<pre>'.( CVarDumper::dumpAsString( $mail ) ).'</pre>';



            $imap->close(); // close connection     


So, I finally get more than a blank page, but now I got this:

PHP notice

Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2)

can anybody help me with this? Thank you! :D

I solved it. it was a litter mistake in the definition of the connection