-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9 Implemented RTF to HTML conversion according to RTF spec #15
#9 Implemented RTF to HTML conversion according to RTF spec #15
Conversation
Please let me know if any changes needed |
That's awesome! In fact, I immediately moved out all RTF conversion related code to a new project and library: rtf-to-html. I already released everything (rtf-to-html:1.0.0 and outlook-message-parser:1.4.0). Again, thanks so much for your contribution. |
I just noticed kschroeer/rtf-html-java, have you taken a look at that implementation? Any idea if it produces different output? |
Haven't seen it. I can to have a look later - most probably next weekend. |
Hi Benny, I had a look at kschroeer/rtf-html-java. It also does RTF structured parsing, however its purpose is a bit different. It convert generic RTF document to HTML, while code I've written is aimed specifically at RTF files, which were created from HTML, i.e. RTF files having
|
Thank you for looking into it. The purpose of Simple Java Mail is to make life easier, not to be academically correct per se. Yes, its primary function to send emails that are handled properly by all clients requires it to properly structure emails according to some RFC spec. However, for its secondary functions such as providing HTML from an RTF source when there is no native HTML body, it suffices to provide a rudimentary approach until a better one comes along. I would love a merge of your approach and the generic approach by kschroeer/rtf-html-java. |
Ok, I raised an enhancement request #16 (not sure how to add enhancement label, probably only you can do it). Probably I'll implement it some time later or someone else can implement it. |
As discsussed in #9 , current implementation still wasn't perfect, so I reimplemented RTF to HTML converter to parse RTF according to RTF spec.
Had to change test data of two existing tests:
Tested this implementation on multiple very complex emails - all emails exactly match HTML source from Outlook (extracted by clicking View Source on an email)