DevShed has the second of a two part tutorial posted today on sending emails with the included mail() function.
In this article we will look at the protocol that is involved in sending email messages. We will also examine the thorny issue of how to send an attachment with an email message. This article is the second of two parts.
They include examples of sending simple messages and more complex ones with things like attachments and custom headers. They also tack on a look at the PEAR::Mail package to the end showing how it can make sending some things a little less painful.