Jump to content

Extract text from HTML message


This topic is 2551 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello, I am currently using the email plugin and it reads the messages fine however I would like to extract just the text from the HTML message. Is there a function that does this? Basically I would like to copy what shows in the Webviewer of the HTML field. I am able to do this with a different plugin but it is not server compatible.

Link to comment
Share on other sites

Hi Trinikal,

Yes, the function to use is EmailReadMessageValue. You pass in the value that you would like to parse from the message. So if you just wanted the plain text of the email it would be EmailReadMessagValue("text"). This is dependent on if the sender included a plain text version of the email. If you want the HTML you can use EmailReadMessagValue("html") or EmailReadMessagValue("htmlRaw") if you don't want inline attachments to be converted to base64 data URLs. 

Please let me know if you have any questions!

Link to comment
Share on other sites

This topic is 2551 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.