Many companies use SigParser to split emails into sections.
Prior to this release you could only get the email body without the signature for the root email in an email chain.
With this release you can get the email body for every email body in the email chain. This is great for forwarded emails.
On every email in the "emails" collection you'll find two properties.
HTML section of the email in the reply chain with the signature lines removed. The Head tag may still be present so you can format the email properly.
Plain text section of the email in the reply chain with the signature lines removed. Links are removed. If you need links, you should convert the HTML version to text and figure out how to preserve the links or HTML as needed.
Must read if you want HTML though...
For performance reasons by default cleanBodyHtml will only be returned for the root email.
If you need more emails than that, you need to provide a new options.outputCleanedEmailHtmlDepth parameter for the number of emails you want to search down.
Default is 1.
10 would mean it would return the cleaned HTML for up to 10 nested emails.
If you don't care about this field, set it to 0 for even better performance.
Each level of emails tends to add between 50ms and 100ms depending on the complexity of the email message.
The cleanBodyPlain fields will be set regardless of this setting for all email messages.
One final thing. With this release the htmlbody field's HTML generation has improved a lot.
You're much more likely to get well formed HTML in this field including the <head> tag which can be important for rendering.
You can read the detailed spec here.