Page 1 of 1

mail() - sending an email with attachments

Posted: Sun Jan 22, 2006 7:51 pm
by tim_kinder
Hello,

I want to send an email in HTML form with 2 text files attached. A working example with source code is located here : http://onworldweb.com/mail

(the source code is also accessable from this link : http://onworldweb.com/mail/source.txt)

The problem is when it comes to my Outlook Express, it also displays attachments in a message body (see http://onworldweb.com/mail/screenshot.gif )

When I compose a message in Outlook Express and attach files - it's ok, I tried to reproduce all the headers/boundaries - but still got attached files displayed in the message body.

Will appreciate any help :)
Sincerely,

Tim Kinder

Posted: Sun Jan 22, 2006 9:43 pm
by Christopher
I'd recommend getting one of the many classes that deal with the details of creating and sending email. I can recommend PHPMailer and PEAR has a Mail class as well.