As I say, you'd need something like Postfix to send the mail. If I understand correctly, you also want to receive internal mail. For this, you'd need a POP3 server.
PHP's mail function works as follows:
1) You call mail() in your PHP script to send an email
2) PHP interfaces with the Sendmail program using the parameters that you provided when calling mail()
3) Sendmail sends the mail by interfacing with the destination server (not important in your case)
This means the following:
1) You need something, like Postfix, that will act as your mail agent (in place of Sendmail, which is just horrible).
2) You need PHP to be compiled with mail functionality. In most cases, this should be true.
3) You need PHP to know what program it is that you want to use for mail(). This is typically specified in php.ini (can't remember exactly, been a while since I set it up). This is because you might have several different mail agents installed, and then PHP won't know which to use.
And that's it! Once you have a working PHP installation (with mail support) and have configured it to use you mail agent, all you have to do is call mail() and it does its thing! Pretty cool indeed.
If you're having trouble getting your head around this whole mechanism, you'd benefit greatly from:
1) Reading
http://communication.howstuffworks.com/email.htm/printable
2) Setting up Postfix (extremely easy) and checking the logs as you make an attempt to get this to work.
Hope this gets you started in the right direction!