Skip to content

Add placeholder for original text/plain MIME body #869

Description

@koolkunz

The problem

Add placeholder for original text/plain MIME body

Would it be possible to add a separate placeholder that retrieves the original text/plain MIME part of an email directly from Thunderbird, when available?

Currently, with some Outlook-generated emails, {%mail_text_body%} appears to perform an HTML-to-text conversion. This can include Outlook/Word CSS (@font-face, MsoNormal, etc.) while also losing paragraph/line breaks.

For example, HTML containing:

DMS could be XXXX
Server 2TB
AMC 5*500 = 2500+Tax

can become:

@font-face ... MsoNormal ... DMS could be XXXXServer 2TBAMC 5*500 = 2500+Tax...

If Thunderbird exposes the original text/plain MIME part, a dedicated placeholder for it would be very useful for AI prompts.

Suggested behavior:

  • Return the original text/plain MIME content without HTML conversion.
  • Keep it separate from {%mail_text_body%} for backward compatibility.
  • If no text/plain MIME part exists, return empty (or optionally fall back to the existing conversion).

This would reduce token usage and provide cleaner, correctly structured email content, especially for Outlook emails.

Additional observation: If I switch Thunderbird to View → Message Body As → Plain Text and then use the existing {%mail_text_body%} placeholder, ThunderAI correctly extracts the clean, properly formatted plain-text version of the email.

Which Operative System are you using?

Windows 11

Which version of Thunderbird are you using?

154.0

Which version of ThunderAI has the issue?

4.1.1.0

Which integration are you using?

ChatGPT Web Interface

Anything in the Thunderbird console logs that might be useful?

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions