Apple uses some kind of proprietary tool (I believe) for this.
As for getting your email back, the big question is: was it saved on the server or not?
If it was (and you can check by visiting your email account through webmail using a web browser), then no issues, your next email program (I suggest Mail) will read it right in. If it wasn't, then you've got two choices: attempt to rescue the files yourself using third-party tools like Tech Tool Pro, or pay a data recovery service.
Pros and Cons of doing it yourself:
PRO: its way cheaper -- most of the recovery programs like Stellar Phoneix, TTP, Disk Warrior and so on run around $100-200.
CON: chances are pretty high you'll get very little or any of it back.
Pros and Cons of paying a data recovery service:
PRO: They will almost certainly get EVERYTHING off that hard drive back for you.
CON: It will cost you $1200 or more.
This is why we go on and on and on around here about the value of backups.