Are you having an issue sending any email, or just emails with attachments?
Some shared hosts aren't setup to be able to send email through PHP's built-in mail()
function. In these cases, you'll need to explicitly connect to an SMTP server and send your mail that way. You should take a look into the mail PEAR package or other solutions for connecting to an SMTP server.
The specific server you connect to should be in your shared servers documentation. If not, you'll need to contact their support people to have them provide this. In fact, it's probably a good idea to look into their support system/forums to ensure that this is the actual cause of the issue, and not some other coding issue.