Re: Re: CONTENT-type for sending HTML attachments
| From: | Angelo Zanetti | Date: | Tue, 20 Mar 2007 08:29:51 +0000 |
| Subject: | Re: Re: CONTENT-type for sending HTML attachments | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250886@lists.php.net to get a copy of this message | ||
Manuel Lemos wrote:
Hello, on 03/16/2007 12:16 PM Angelo Zanetti said the following:So if the HTML files are attachments and the text is just plain text then will the content-type of the message be text/plain and then each attachment be multipart/alternative. Please note that the HTML files need to be sent as attachments and not part of the body. On my email client I was receiving the emails correctly (IE: message body and HTML files as attachments) but on my client's email client they were just receiving blank messages. I'm just a little confused about the content types as you might have gathered. TIA.Hi guys. Im using the HTML Mime Mail <http://www.phpguru.org/static/mime.mail.html> class from phpguru.org. Anyway I've written a few scripts that use the class to attach files to it. These files are HTML reports but Im not sure what MIME content-type to use. The content type I use to for the attachments is text/html. But Im not sure that the content type for the email itself should be plain/text as this just displays the HTML attachment as garbage in the body text.You should never send HTML only messages, as most spam filters will discard your message. Usually you need to have an alternative text part like the messages composed by normal mail clients.