Re: Send XHTML emails with images

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

 



Hello,

On 11/05/2004 12:02 PM, Gery Duyck wrote:
I've made an XHTML page to be send as a rich e-mail so I can do more as just
tekst.
Everything is fine, except for the images.

In the source code I say the images are like <img
src="http://www.domain.com/pic.jpg"; alt="" />
but wen I send the email, I can't see the images in Outlook Express or
Hotmail (in browser).

The problem is that you can't send messages with only an HTML part. You are required to send both the HTML part and an alternative plain text part for mail programs that do not support HTML messages. If you send HTML only messages, some systems classify your message as spam and refuse to show any images that it references.


What you need to do is to compose multipart/alternative messages. If you do not know how to do that, you may want to try this class that comes with an example of sending HTML messages with an alternative text part. It may also embed the images in the message, which is a safer solution if you want your messages to reach the recipients and show the images.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
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