3

I am trying to read mail from a pop3 server and print it through cups. I want to keep the html formatting of the email as it was received and that is where I am having trouble

On seeing header of every formatted email on the web client, I can see it has two versions in one email. One is text/plain version, without formatting. Other is text/html version which contains the html code of the formatted email. I am using fetchmail to retrieve the email and then mailx to read is. My problem is that I can only see the text/plain version. The html version is not available.

I have a doubt that fetchmail is somehow truncating the html version. My question consists of two parts:

1) How can I make fetchmail bring whole email i.e. with text/html part so that the original email can be generated

2) How can I print that email in html format (without html code, only output) to on the paper. I am using Raspbian with fetchmail, mailx and cups for the above mentioned tasks

I have tried mutt to read the email as well but with same results. So the problem is somewhere in fetching or forwarding it to the local user mailbox

EDIT: Upon using cat /var/mail/username | grep html, I can see the emails DO contain html versions. So the error is not with fetchmail. There is some thing I am missing with mailx or mutt, that is not displaying html version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.