Defect #10201

MailHandler ignores line feeds when handling html-only emails

Added by Elie Delorme over 10 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Email receiving
Target version:-
Resolution:Fixed Affected version:


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

Related issues

Related to Redmine - Feature #16962: Better handle html-only emails Closed


#1 Updated by Etienne Massip over 10 years ago

  • Category set to Email receiving

#2 Updated by Go MAEDA over 3 years ago

#3 Updated by Go MAEDA over 3 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Redmine 3.1 and later use Loofah to parse HTML emails.

Also available in: Atom PDF