Discussion:
How extract the HTML from a mail
(too old to reply)
Tommy Mikkelsen
2010-02-12 13:58:54 UTC
Permalink
Look for an attachment named text.htm

Then digest it, and look for embedded pictures....those will also be in
the attachment collection
--
Tommy Mikkelsen
IT Quality A/S, Denmark
Novell Support Forums SYSOP / NKP

Sorry, but no support through email
Please join http://www.open-horizons.net
Michael Bell
2010-02-12 17:03:46 UTC
Permalink
Thanks.
The embedded images in the HTML has the following within the img tag,
The attachment collecection does not have a image004.jpg but has a
image.jpeg
How can these images be linked or update the image tags so that it
picks the image from a local folder.
The HTML preview of the email in NGW email application shows the
embedded images correctly.
you have to parse the mime.822 file in those cases.
Tommy Mikkelsen
2010-02-13 00:09:36 UTC
Permalink
Ahhmmm....Nope....AFAIK

When you look at the attachment list, they are listed in order......

So if the html first ref. to src="cid:***@01CAA8D1.C05E09A0"
then that's the first attachment after the text.htm and so on....

Only thing that might interfere with this, is digital signature, and I
simply can't remember if that's put in last on first
--
Tommy Mikkelsen
IT Quality A/S, Denmark
Novell Support Forums SYSOP / NKP

Sorry, but no support through email
Please join http://www.open-horizons.net
Tommy Mikkelsen
2010-02-15 10:27:27 UTC
Permalink
=> How to identify if a attachment is an embedded image?
Attachments.Item(Index).ObjType, return 1 for an attachment and an
embedded image.
digest the html part, and start counting the CID entries
=> For each embedded image is there a way to get the reference in the
HTML such as the cid, so that it can be searched and replaced with the
physical file name?
?
--
Tommy Mikkelsen
IT Quality A/S, Denmark
Novell Support Forums SYSOP / NKP

Sorry, but no support through email
Please join http://www.open-horizons.net
Preston Stephenson
2010-02-15 16:37:54 UTC
Permalink
In 8.0, we expose the content-type and content-id
of the attachments.
The HTML message body attachments are grouped
together as attachments. The text.htm attachment
is first followed by any embedded graphics
attachments. Each embedded graphic attachment
will have an content-id value.

The logic is to get the text.htm attachment and
any following attachments that have a content-id
until there is not an attachment or an attachment
does not have an content-id.

Preston
On Friday, February 12, 2010 at 8:06 AM,
Thanks.
The embedded images in the HTML has the following within the img tag,
The attachment collecection does not have a image004.jpg but has a
image.jpeg
How can these images be linked or update the image tags so that it
picks the image from a local folder.
The HTML preview of the email in NGW email application shows the
embedded images correctly.
Loading...