Re: Re: CONTENT-type for sending HTML attachments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Angelo Zanetti wrote:
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.

You're trying to do this, right?

MIME Email
-> Part 1: Text Message (The message that you want displayed)
-> Part 2: HTML Attachment
-> Part 3: HTML Attachment
-> ...
-> Part N: HTML Attachment

Because it's a mime email, your text part will be a mime part (an attachment) as well, but basically any mail reader these days will render that as the main part.

You want your main email ("MIME Email" above) to have a multipart/alternative content type. Your text part ("Part 1" above) should be text/plain. Each HTML part ("Part 2" to "Part N" above) could be text/html. If you want to force those HTML parts as attachments you could use application/octet-stream for the content type - mail readers should treat them as binary. Whatever mime class you're using should hopefully take care of any encoding that may or may not be necessary.

jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux