Having some problems where the incoming email is pure HTML - ie Newsletters.
Have two fields but on some emails they are both blank:
forms.wx_documents.detail = msg.getPlainMsg()
forms.wx_documents.detail_html = msg.getHtmlMsg()
Following is part of raw text from Microsoft Partner Program newsletter that formats/displays OK in other email clients but is completely blank in Servoy.
But I guess it’s going to be difficult to code these changes as I assume these extra parts of the header will vary depending on how the Sender writes the code.
My Client accepts that they not missing much at moment since pure HTML emails tend to be newsletters or spam - however they are concerned that some useful info from their clients/suppliers may be lost in the future.
Maybe an opportunity for one of our resident Plugin aces ???
Does the HTML render with the plain ?
In my test it did render with the MS HTML tag as long as the META tag was removed.
I did my test on Servoy Developer
Version R2 2.2.1-build 333
Java version 1.4.2-54 (Mac OS X)
As for automatically removing the tags.
You could use regex (regular expressions) to remove the META and replace the HTML tag. You could even do it for displaying purposes only like with a calculation field. This way you keep the original data.
No, the MS Developers message it did not display with just - however I now suspect that it may have been due to other playing/testing I had been doing. Will look at it again later with yours & Bobs suggestions.
Regex - another dark corner of Servoy that I’ve managed to avoid so far Looks like now’s the time to get my hands dirty.