imap_headerinfo()这个函数可以解决你的第一个问题,
ccaddress (full cc: line, up to 1024 characters)
cc[] (returns an array of objects from the Cc line, containing):
   personal
   adl
   mailbox
   host
to[] (returns an array of objects from the To line, containing):
   personal
   adl
   mailbox
   host
----很简单,偶就不翻译了
具体的见
http://www.zend.com/manual/function.imap-headerinfo.php
第2个问题,没有看明白,好象是javascript的功能吧:-(To get these functions to work, you have to compile PHP with --with-imap. That requires the c-client library to be installed. Grab the latest version from ftp://ftp.cac.washington.edu/imap/ and compile it. 
Then copy c-client/c-client.a to /usr/local/lib/libc-client.a or some other directory on your link path and copy c-client/*.h to /usr/local/include or some other directory in your include path. Note: Depending how the c-client was configured, you might also need to add --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos into the PHP configure line. 
Note that these functions are not limited to the IMAP protocol, despite their name. The underlying c-client library also supports NNTP, POP3 and local mailbox access methods. 要先到 ftp://ftp.cac.washington.edu/imap 下载 IMAP 的最新的客户端程序。在编译完成之后将 c-client/c-client.a 复制到 /usr/local/lib/libc-client.a 之中(!---注意这里,和从前翻译的版本不同---!),并将 c-client/*.h文件复制到 /usr/local/include 之下。之后编译 PHP 程序时要加入 --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos的选项。
要安装imap协议,这个c-client库也支持nntp,pop3和本地邮箱的访问。
--------翻译的可能不是很清楚:-(  水平有限啊:-(
希望能帮点忙