Building your own PHP with IMAP support is not that hard, but i
noticed a lot of people tend to have problems when they want SSL support
in it.
You might run into stuff like this (when reconfiguring php f.e.):
configure: error: utf8_mime2text() has new signature, but
U8T_CANONICAL is missing. This should not happen. Check config.log for
additional information.
This exact same problem came...
PHP5 with IMAP and SSL support
Continue reading PHP5 with IMAP and SSL support