Why not just use the mail functions built into PHP to do this?
Information on this can be had in the PHP online docs at:
http://www.php.net/manual/function.mail.php
And for a great little tutorial, check out Julie Meloni's article at:
http://www.thickbook.com/extra/php_email.phtml
...and consider supporting the good folks involved with PHP by buying one or more books on the subject.
I have Julie's "PHP Essentials" book and other than some typos and minor errors, it's a bangup intro book, especially for those looking to do database integration using PHP. In fact, that is where I first read about mail() and I've found that www.thickbook.com contains online much of the material from her published works.