Python email.MIMEText.MIMEText.as_string incorrectly folds long subject header

Solution Verified - Updated -

Issue

Long subject headers are folded using a newline and tab in email.MIMEText.MIMEText.as_string. While this is not exactly prohibited by RFC 822 it breaks mail clients like Thunderbird and Outlook.

Environment

  • Red Hat Enterprise Linux 6.1
  • Python 2.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.