aspose file tools*
The moose likes Java in General and the fly likes conversion of mime type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "conversion of mime type" Watch "conversion of mime type" New topic
Author

conversion of mime type

arun raj singh
Greenhorn

Joined: Mar 12, 2012
Posts: 6
Hi all,


Is there any way to convert the MIME type of emails from html to plain text?. I am receiving emails in my java code which are of html mime type. There are lot of html tags in it. I want to remove these tags and get it converted to plain text mime type. Will changing mime type help? or there is another way to do this?

Any help will be hugely appreciated.

Thanks,
Arun
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

The MIME type is meant to describe what's in the message. It just acts as a label.

So suppose you had a box containing a pair of shoes, and there was a label on the outside which said "Shoes". And suppose that you peeled off that label and replaced it with another label which said "Chocolate". What's in the box now?

It's the same way with MIME types. Changing the MIME type of a message won't magically change the contents of the message. So if you want to get rid of the tags, you're going to have to put together some code which does that.
arun raj singh
Greenhorn

Joined: Mar 12, 2012
Posts: 6
Thanks Paul.

I got your point. Writing down code for this will surely take long time but have to do this. No other go. Thanks for your valuable input.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: conversion of mime type