Is there a way to decode html e-mails?

You can use PHP's strip_tags() function, and it's optional "allowable_tags" parameter. This will allow you to strip out all the tags that are not em.

You can use PHP's strip_tags() function, and it's optional "allowable_tags" parameter. This will allow you to strip out all the tags that are not etc. About RTF vs. HTML, my understanding is that when Outlook and Exchange communicate with non-RTF compliant systems they convert RTF to HTML. I'm not sure this is always true, or how consistent that function is, but that might explain why messages sent RTF appear to be HTML.

Not so much for my lists :( dl.getdropbox. Com/u/5910/Jing/2009-02-23_2100. Png FU outlook!(sorry) – Thomaschaaf Feb 23 '09 at 20:01 strip_tags is inadequate, if you don't trust the user (Which may or may not be the case here).

Use HtmlPurifier instead. – troelskn Feb 23 '09 at 20:15 HTMLPurifier looks delicious! Just have to get it to work with the Zend Framework :) – Thomaschaaf Feb 23 '09 at 20:32 @Thomaschaaf, this is seriously ugly.

If you're only worried about ul's you might be able to replace them all first since the code is at least consistent, ol's are probably also ugly but consistent, but you're probably back to writing your own library. – acrosman Feb 23 '09 at 20:35.

Pulling out the HTML from an Outlook mail may seem scary at first, but it's only HTML tags - just a whole lot of them! So if you just locate to a "" you have a tag. If it is not something you want to have, like "" just throw it away and repeat Simple as that.(I have done exactly this in a spelling and grammar checker which not only pulls out plain text from Outlook and checks it - it can then push all the user's changes back into the HTML without destroying any tags.

The latter was not easy, though! ;-).

You can pipe it through htmltidy and then further filter it with something like HtmlPurifier, but of course you may strip out something that is essential to understanding the contents. That's the problem with a visual format, like html.

I'm pretty sure you'll have to write your own class... there is no real class like that in the PHP documents I've seen..

I was thinking of a class someone has written since I would have to look at what shitty things all the major guys do.. Outlook, Apple Mail, Windows Live Mail, gmx, gmail .... – Thomaschaaf Feb 23 '09 at 19:41.

Or you could use the plain-text variant attached to the e-mail. If there is no plain-text variant you could use a stripped version of the html. I think using these steps you would have a nice result: Remove newlines Turn and into newline Strip all html tags.

Would not give me the possibility to use bold, italic, underlined, streched out and lists. – Thomaschaaf Feb 23 '09 at 19:45.

I don't want to display the E-Mails in a frame because I want to work with the data and analyse it. I also don't want to support stupid things like changing font since its a webapp I want my webapp to say what the font is and not have some hippie who sends the support team e-mails in comic sans and yellow color. I want to support bold, italic, underlined, streched out and lists (

).

I also don't quite know the difference between rich-text and html since I always thought rich-text only allowed the functions I wanted but I seem to be able to do everything in rich-text which I can do in Html.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions