Yes, thou you either have to do it with php's sockets (See "Network Functions" in the php documentation) functions or use the IMAP plugin avaliable from ftp://ftp.cac.washington.edu/imap/
Check out "IMAP, POP3 and NNTP functions" in the php documentation as this is way more work that I really want to put into a simple Forum response.