LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-25-2016, 06:03 PM   #1
n1uro
Member
 
Registered: Feb 2016
Posts: 32

Rep: Reputation: Disabled
Converting incoming mail from HTML to all plain text


I've been trying to come up with a simple solution to convert ALL incoming HTML based mail (evil!) to plain text. I would assume something along the lines of a good .procmailrc would do calling html2text but I haven't been able to figure out a good recipe for it yet.

Any suggestions would be most welcomed and appreciated.
 
Old 07-25-2016, 08:53 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Is this for your personal use?

If so, you might consider using a text client, such as Mutt, or the GUI Claws mail client, which defaults to displaying mail in plain text (in other words, it ignores the HTML). You can get a plugin that will display--not send--properly formatted HTML if it's one of those few emails that you decide you wish to view in HTML.

A web search for "linux strip html from email" turns up a number of links about this. You might find one of them useful.
 
Old 07-25-2016, 09:03 PM   #3
n1uro
Member
 
Registered: Feb 2016
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Is this for your personal use?

If so, you might consider using a text client, such as Mutt, or the GUI Claws mail client, which defaults to displaying mail in plain text (in other words, it ignores the HTML). You can get a plugin that will display--not send--properly formatted HTML if it's one of those few emails that you decide you wish to view in HTML.

A web search for "linux strip html from email" turns up a number of links about this. You might find one of them useful.
Thanks for responding but I think you don't fully understand the scenario.
This would be for ax25 based mail importing tcp/ip based mail. My client uses a simple dumb terminal on shortwave radio or VHF based FM radio. Shell access or clients such as Mutt and especially a GUI on a dumb terminal are not options. The issue is an incoming HTML based mail can't not be read cleanly on a dumb terminal. I'm thinking a .procmailrc file may do the trick.
 
Old 07-25-2016, 09:33 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Note the question that prefaced my response:

Quote:
Is this for your personal use?
The information that you just posted would have been useful in your initial question. I'm sure that it will help others offer more useful suggestions than did I in subsequent replies.
 
Old 07-25-2016, 09:39 PM   #5
n1uro
Member
 
Registered: Feb 2016
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Note the question that prefaced my response:
The information that you just posted would have been useful in your initial question. I'm sure that it will help others offer more useful suggestions than did I in subsequent replies.
I know it would have been useful, however I didn't want environment to bias a response. Clearly environment has. Nothing I've searched has been able to do whats needed unfortunately. I can't believe how SMTP has been so destroyed over the years (thanks B.G!)
 
Old 07-27-2016, 05:40 AM   #6
Elizine
Member
 
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
You can set the default format for clients to html. You cannot change the format of a text message to html.
 
Old 07-27-2016, 08:53 AM   #7
n1uro
Member
 
Registered: Feb 2016
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Elizine View Post
You can set the default format for clients to html. You cannot change the format of a text message to html.
Thanks for the response, however I'm trying to do just the opposite for incoming mail. I don't wish HTML code on a dumb terminal when reading.
 
  


Reply

Tags
email, html, text processing



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can send and receive plain text mail, but can't receive on html pravada Linux - Server 6 05-20-2013 03:25 PM
can't receive on html mail but plain text mail works fine. pravada Linux - General 4 05-17-2013 10:37 PM
[SOLVED] Can send and receive plain text mail, but can't receive on html pravada Linux - Software 1 05-17-2013 03:13 PM
Problem in printing HTML content as plain text tucs_123 Programming 4 09-19-2009 01:07 AM
plain text to html convertor app for Linux?? linus72 Linux - Newbie 4 04-07-2009 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration