From: ashok kumar <[EMAIL PROTECTED]>
Date: Thu, 27 Jul 2006 10:55:08 -0700 (PDT)

Hi All,

  I am new to this field.
Iam trying to store the messages into the database from the POP server. (Messages whcih are stored into the POP)

Are these messages containing XML? If not, an XML parser like Xerces isn't likely to be much help.

Now I have problem in storing those message in which the body has the text as well
  as the images (like .gif)

But I am succesfully able to store those messages which has the body contaning
  ONLY text.

and even those messages also which has the body as the text and attachment. in this
  senario I am simply storing the path of the attached file.

Is this path (presumably from the MIME section headers) on the sender's or recipient's machine, though? Most likely the sender's (since their mail client won't have any idea about the OS or file system of whoever it's being sent to), in which case it probably won't be a valid path on the machine processing the mail anyway.

so please guide me how to store those messages whose body contains text + images.

Much the same as for attachments, except that the MIME part containing the file will probably be inside a multipart/related part rather than in a multipart/mixed. The embedded files will probably be base64 encoded, which you can decode back to a byte array then store in the database in a BLOB (or equivalent) column. However, different mail clients may nest things in a different order when there's both attached or embedded files and a multipart/alternative for HTML & text versions of the message, so make sure you test your code using all the common mail clients you're expecting people to use.

  Note: I am writting the script in PHP.

So why are you asking on the mailing list for a java-based XML parser? You'll have more luck on a PHP list...


Andrew.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to