You should take a look at wp_mail on the codex. This will do everything you need, and it’s “the wordpress way”. There are also particular controls for attachments.
Basic usage is:
<?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?>