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