Project

General

Profile

Actions

Defect #10201

closed

MailHandler ignores line feeds when handling html-only emails

Added by Elie Delorme almost 13 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Since all html tags are strips on html-only emails, they almost never work.
I would suggest using Loofah to convert html content to plain text.

Patch (works on my installation):

    if plain_text_part.nil?
      # no text/plain part found, assuming html-only email
      # use loofah to extract text
      @plain_text_body = Loofah::HTML::Document.parse(@email.body.to_s).to_text
    else


Related issues

Related to Redmine - Feature #16962: Better handle html-only emailsClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF