mail() - sending an email with attachments

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tim_kinder
Forum Newbie
Posts: 8
Joined: Sun Jan 22, 2006 7:48 pm

mail() - sending an email with attachments

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post 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.
(#10850)
Post Reply