Subject: | Headers with \n wreak havoc |
The following snippet:
use MIME::Lite;
print MIME::Lite->new(Subject => "This is a bad header\n",
To => "me\@here")->header_as_string;
Produces this:
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Type: text/plain
MIME-Version: 1.0
X-Mailer: MIME::Lite 3.01 (F2.73; B3.05; Q3.03)
Date: Fri, 20 Jan 2006 15:25:35 -0500
Subject: This is a bad header
To: me@here
Looks like each header value should be chomped to prevent this.