Part.getContent() is your friend when reading anything from an email's contents. Message implements Part.
Run the following recursive call on your Message and see what it returns:
You'll then see for each little part of your email how it is represented. The content could be a String, Multipart, or something else. It's one of those "something else"s you will need.
do i insert email attachment as string object into the database.
and treat as string object to select attachment to resultset
how to add link to text,after clicking text ,then download and save as the attachement.???