Subject: | Email::MIME->new($message) destroys header formatting |
Date: | Sun, 14 Jul 2013 13:27:44 -0700 |
To: | bug-Email-Simple [...] rt.cpan.org |
From: | "Ronald F. Guilmette" <rfg [...] tristatelogic.com> |
I'm trying to use the Email::MIME parser to parse a message from which
I will then edit out certain headers, and then reconstruct the original
message... hopefully verbatim... minus the header(s) I have removed.
It is the "verbatim" reconstruction of the message that is the problem.
That isn't working because when I use:
Email::MIME->new($message)
to parse the original message text, the parser is doing two quite
annoying (and as far as I can tell quite unnecessary) things, specifically:
1) Within the body text of each header line, leading whitspace
within the body of the header line is being unnecessarily
removed.
2) Within the body text of each header line, line continuations
(i.e. <CR><LF><WS>) are being unnecessarily removed.
The above two factors make it impossible to reconstruct, verbatim, a
message from its component parts once it has been parsed by
Email::MIME.
I can understand how and why it might be inconvenient, within the code
of Email::MIME, to preserve the exact original formatting... including
leading whitspace and line continuations... but it sure would be helpful
if you guys could implement it anyway.