Small fix for Mail-MboxParser-0.55



Hello,

Attached is a slightly modified version of Mail.pm (v 1.53) which is
contained in the package Mail-MboxParser-0.55. It fixes a problem which
caused the header() function of the Mail::MBoxParser::Mail class to
return erroneous results for some mail messages.

It turns out that some Mail User Agents (notably certain versions of
Outlook) place a Tab (0x09) rather than a Space (0x20) character after
the ':' on some header lines. This was causing a problem in the
'_split_header' subroutine because it was explicitly searching for a
colon followed by a space (": ").

The new, attached version of Mail.pm avoids this problem by splitting
the header line into $key and $value components at the first ':' without
regard to the character that follows. Leading and trailing whitespace is
then stripped from the $value component.

I hope you will find this fix acceptable and will be able to incorporate
it into the next version of Mail-MBoxParser.

Thank you also once again for writing and maintaining this wonderfully
useful module.

Best regards,
<ED>

P.S. I apologize if this is a repeat message for you. My direct e-mails to you received no response and I suspected that they were getting caught in a junk mail filter.

Attachment: Mail.pm
Description: Perl program



Relevant Pages

  • RE: Quoted Printable in Messages (Subject Changed)
    ... which definitely went out in HTML format with all the MIME headers and so ... The important part is the Content-Transfer-Encoding: header line. ... the last character on the line as a "soft" line break accommodates longer ... followed by a two-digit hexadecimal representation. ...
    (comp.os.vms)
  • [solved] Problems displaying Japanese characters in alert boxes
    ... the original encoding, ... should not differ from the header value (with HTTP, ... the content of an XHTML `script' element served with an XML MIME media type. ... special Unicode font for that character range in order to display the ...
    (comp.lang.javascript)
  • Re: Writing to the newsgroup?
    ... you should be able to set the encoding and use the encoding you ... I'm not familiear with Unitype Global writer, ... message header or e-mail header, you can see what encoding you're using. ... However, if you use its help feature to inquire about 'character encoding', ...
    (sci.lang.japan)
  • Re: she may both negotiate inside isolated guilty mirrors
    ... dear character. ... Afif wills the cheek prior to hers and partially handles. ... Gawd Lydia will sue the criterion, ... it resembles a gaze too broken with regard to her ...
    (sci.crypt)
  • Re: [OT] character sets.
    ... charset to the headers. ... Do you think it's not a recommended header? ... the body of a message may only contain ASCII characters ... character is better than 7 bits per character, ...
    (rec.juggling)