Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

Can I delete the HTML part of a received multipart email?

  • 9 ответов
  • 0 имеют эту проблему
  • 20 просмотров
  • Последний ответ от frisée

more options

I couldn't find this in any forum (other than some very old threads that are no longer applicable or relevant), and I couldn't find an extension/add-on that does that either (or rather, I did find one, but it's discontinued and not compatible with current Thunderbird), but I want to store only the plain-text part of multipart messages (text + HTML) that I receive, deleting the HTML part.

The reason for this is that I need to save disk space. I'm a digital hoarder, and I archive every relevant email message I receive (I only don't store spam that escapes through the cracks and reaches me, and such disposable messages as 2FA login codes and the like). I have several sound reasons to do that, but old messages have been useful to me as reference countless times. I have about 86,000 emails stored, sorted into a variety of message folders by topic, correspondent, etc. Some date as far back as 1996, having survived lots of account, email client, and hardware migrations through diligent backups and restores.

This results in a very large disk usage, and I must minimize it, for both space itself and backup time reasons. And the difference in size can be dramatic. Just one newsletter that I'm subscribed to sends me 3-4 messages a day, of which I'll probably keep two, but each full message is about 120–150 kB. Stripped of the HTML (and still totally readable and functional), that drops to just 10–12 kB. Now multiply that difference by the volume in one year.

I'm testing and evaluating Thunderbird to replace my current email client, which is excellent and designed for power users, but also very buggy, they're slow to fix the bugs, and this is getting on my nerves. That's why I'm looking for an alternative, and so far, Thunderbird is doing an excellent job in ticking off the list of features I need (and passed my message import tests from the old mailer with flying colors), except for this one feature, which can be a dealbreaker.

Any suggestions? Thank you very much in advance.

I couldn't find this in any forum (other than some very old threads that are no longer applicable or relevant), and I couldn't find an extension/add-on that does that either (or rather, I did find one, but it's discontinued and not compatible with current Thunderbird), but I want to '''store only the plain-text part''' of multipart messages (text + HTML) that I receive, deleting the HTML part. The reason for this is that '''I need to save disk space.''' I'm a digital hoarder, and I archive every relevant email message I receive (I only don't store spam that escapes through the cracks and reaches me, and such disposable messages as 2FA login codes and the like). I have several sound reasons to do that, but old messages have been useful to me as reference countless times. I have about '''86,000 emails''' stored, sorted into a variety of message folders by topic, correspondent, etc. Some date as far back as 1996, having survived lots of account, email client, and hardware migrations through diligent backups and restores. This results in a very large disk usage, and I must minimize it, for both space itself and backup time reasons. And the difference in size can be dramatic. Just one newsletter that I'm subscribed to sends me 3-4 messages a day, of which I'll probably keep two, but each full message is about 120–150 kB. Stripped of the HTML (and still totally readable and functional), that drops to just 10–12 kB. Now multiply that difference by the volume in one year. I'm testing and evaluating Thunderbird to replace my current email client, which is excellent and designed for power users, but also very buggy, they're slow to fix the bugs, and this is getting on my nerves. That's why I'm looking for an alternative, and so far, Thunderbird is doing an excellent job in ticking off the list of features I need (and passed my message import tests from the old mailer with flying colors), except for this one feature, which can be a dealbreaker. Any suggestions? Thank you very much in advance.

Все ответы (9)

more options

There are also messages that are just HTML. What I think you want is to convert HTML to plain text. And a large part of the content are the headers. Anyway, this product (which I have not used) may be what you're seeking:

 https://www.coolutils.com/TotalHTMLConverter/HTM-to-Text-In-Batch

Полезно?

more options

david said

There are also messages that are just HTML. What I think you want is to convert HTML to plain text. And a large part of the content are the headers. Anyway, this product (which I have not used) may be what you're seeking: ...


No, David, sorry, but that's not what I want, and that product is not what I need. I'm not interested in plain-text visualization or in converting HTML into text. I'm interested in saving disk space by deleting the HTML part of multipart messages.

Such messages (which can also be sent by Thunderbird) contain several parts, and may contain one part with the text in HTML and another with the same text stripped of any tagging. Other parts may contain attachments, if any — that's how they're organized in a message (and Thunderbird can delete attachments, I've already seen that it can; since the HTML is also just a "part" in this format, Thunderbird should be able to delete it as well).

I'm aware that the headers also take up some space, but they pale in comparison with what some professional emails do with their HTML part. They don't just add a short tag here and there for bold or Italics. They are complex Web pages of their own, complete with long JavaScript routines, embedded cascaded style sheets, division formatting, and much more, not to mention that they often use inefficient, verbose, and repetitive HTML code (not just merely "tagging"). This is exactly why (correct me if I'm wrong) Thunderbird must use Gecko, the same HTML rendering engine in Firefox — it needs nearly all the bells and whistles of a full-fledged browser. The result is a monster-sized message. See my example of the newsletter in my initial question above.

And I'm also aware that some messages don't contain an alternative plain-text part. I don't intend to delete the HTML in such cases. My current mailer not only allows me to delete the HTML part, it automatically detects if the message doesn't have a plain-text version and refuses to delete the HTML in such cases, for safety. It can also show me the two parts separately and even allows me to configure which I want to see by default. Maybe that would be asking too much (I said that it's a product for power email users), but I'd be happy just with the option to manually decide that.

Изменено Goytá

Полезно?

more options

There is an addon called : 'Header Tools Lite'

This allows you to edit the actual source of email, but I would advise you to only use it if you feel confident you know what you are doing.

Полезно?

more options

Toad-Hall said

There is an addon called : 'Header Tools Lite' This allows you to edit the actual source of email, but I would advise you to only use it if you feel confident you know what you are doing. ...


That could do the job if I manually edited the message source and deleted the HTML, but it would be impractical and too time-consuming (and a bit risky) to do that with every multipart message.

For comparison, see in the first attached picture how a multipart message with HTML and plain-text versions is displayed in my current mailer, and what I have to do to view both parts and delete the HTML.

The HTML part is shown as an icon in the vertical pane on the left (the same happens with any attachments). If I want to delete it, I just have to right-click the icon and select "Delete". If there is no plain-text version (meaning that the message would be empty and useless if I deleted the HTML), the mailer will automatically detect it and will not delete the HTML.

I can also easily view either version by using the tabs in the footer (red arrow).

As far as I can see, Thunderbird doesn't have anything even close to this functionality. And this particular example message is 149 kB in size. After stripped of the HTML, only 12 kB. Now compare what I have to do now with scrolling over >100 kB of HTML code and text in the message source (that's a lot of text!), carefully selecting it and deleting it, for each and every multipart message of the many I receive every day. Not feasible.

Полезно?

more options

86,000 emails x 149KB = c.13Gb storage. In today's availability of hardware, that doesn't seem a lot of space required.

Полезно?

more options

frisée said

86,000 emails x 149KB = c.13Gb storage. In today's availability of hardware, that doesn't seem a lot of space required.

In terms of local storage, it really isn't a lot (and it's much less than that, because the vast majority of my stored messages is much smaller than that example newsletter, in part exactly because I delete any HTML when possible, and also in part because I save any attachments elsewhere and delete them from the messages as well).

However, size still matters (especially with 86,000+ messages in dozens of folders) in terms of:

  • email program loading time (even with a fast NVMe SSD and a multicore CPU)
  • time for other software tasks (folder compression, searches, etc.)
  • backup size and processing time
  • cloud space allowance and upload time for online backups

These and other reasons are why I try to keep it as small and optimized as possible.

Изменено Goytá

Полезно?

more options

If you're concerned about email loading times and the like (and, honestly, that quantity of emails in Thunderbird gets riskier with each additional email - I trust that you back up all your profiles on a weekly basis), you could batch convert the emails to pdfs. I've never done it - and never would (I don't have 800 emails worth saving - let alone 86,000) - so I can't vouch for the program in the following link (the third one)...

https://www.data-recovery-solutions.com/blog/export-thunderbird-emails-to-pdf-format/

...and this post has to be moderator approved, too, so it may not appear for several hours.

Полезно?

more options

frisée said

If you're concerned about email loading times and the like (and, honestly, that quantity of emails in Thunderbird gets riskier with each additional email - I trust that you back up all your profiles on a weekly basis), you could batch convert the emails to pdfs. I've never done it - and never would (I don't have 800 emails worth saving - let alone 86,000) - so I can't vouch for the program in the following link (the third one)... https://www.data-recovery-solutions.com/blog/export-thunderbird-emails-to-pdf-format/ ...and this post has to be moderator approved, too, so it may not appear for several hours.


It has appeared already. Thank you for your willingness to help, @frisée, but I prefer to keep my emails within a proper client that can manipulate them as what they are. I'd also have trouble cataloging PDFs, and searches (especially complex ones, like by sender and date range or by subject and account) and following threads would be unfeasible. On occasion I must create PDFs from certain emails, but then I just "print" the email to one of several available virtual PDF "printers". And the file is usually larger — the opposite of what I need.

Oh, and rest assured that I backup my emails almost daily.

Полезно?

more options

Goytá said

Oh, and rest assured that I backup my emails almost daily.

That's resassuring.

Полезно?

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.