You are here: Re: mail from html « All PHP « IT news, forums, messages
Re: mail from html

Posted by Janwillem Borleffs on 02/12/06 19:47

Gufo Rosso wrote:
> replace <img src="http:// ..." in <img src="cid:
> in html email (convert html page in html mail)
> trancks
>

For this, you will have to take the following steps:

1. Fetch the page;
2. Get all img tags and parse the source attribute;
3. Fetch the images, apply the base64_encode() function to the binary data
and create a boundary of it, associating an id and store the result, per
example, in an array;
4. Iterate to the boundary array and replace the src attribute values with
CIDs;
5. Construct the mail and send it.

To give you an idea of the complexity, see the following example, which
somewhat works on the Google index page (and won't work on more complex
pages):

http://playground.jwscripts.com/html2mail.phps


HTH;
JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация