NAME
    Mail::Eudora version 0.69 - Manipulate Eudora mailbox files

SYNOPSIS
      use Mail::Eudora;
      print "Using Mail::Eudora version $Mail::Eudora::VERSION";
      @messages = get_messages_from_file($filename);
      # or read an Eudora .mbx file into $mbx, and then
      # @messages = get_messages($mbx);
      %message_24 = parse_message(@messages[24]);
      append_message($FILE, %message_24) or warn "$Mail::Eudora::error";

DESCRIPTION
    Mail::Eudora provides a few subs to manipulate Eudora .mbx
    mailbox files. It doesn't handle the .toc index files (Qualcomm
    doesn't disclose it's .toc file structure, and says they keep
    changing it). This means that if you use append_message, you
    have to delete the .toc file, and loose all Eudora proprietary
    information (labels, status, etc...). It exports the following
    subs to your namespace:

      get_messages

      get_messages_from_file

      parse_message

      append_message

USAGE DETAILS
    get_messages()
        `@messages = get_messages($mbx);'

        - takes a string containing any number of messages from an
        Eudora .mbx mailbox file

        - returns an array containing all single messages.

        A new header is created in each message:

        X-eudora-date: with the date Eudora added when it got the
        message. When you use append_message, this header is
        replaced back with the original Eudora message separator:
        'From ???@??? '

    get_messages_from_file()
        `@messages = get_messages_from_file($FILE);'

        same as get_messages(), except it takes a string containing
        the Eudora .mbx mailbox filename instead of a string with
        the messages

        On big files, this seems much faster than get_messages.

    parse_message()
        `%message = parse_message(@messages[24]);'

        - takes a string containing one message (usually an element
        of the array returned by get_messages)

        - returns a hash where keys are header names plus a 'Body'
        key and values are what you expect: values...

        $subject = $message{Subject};

        $body = $message{Body};

        $x_info = $message{'X-info'};

        etc...

        $message{Received} contains all Received: headers. They are
        restored to separate headers when you use append_message.

        case of headers is normalized using ucfirst( lc $header ).
        So even if the original header was "X-Info", now it is "X-
        info".

    append_message()
        `append_message($FILE, %message) or warn
        "$Mail::Eudora::error";'

        - takes a string containing a file name and a hash
        containing one message - usually obtained with
        parse_message(@messages).

        - returns 1 on success, undef on an error opening the file,
        0 on an error closing the file (in case you care to check
        for the difference). If there was an error, it's now in
        $Mail::Eudora::error.

        append_message reformats %message into the correct Eudora
        format and appends it to $FILE.

        It also adds an X-hack: header, so you have a trace that
        this message was added by your script.

    package variables
        The following variables are not exported, but you can still
        access them with their full name:

    $Mail::Eudora::error
            Error on a file open or close in append_message

    $Mail::Eudora::VERSION
            The package version number

AUTHOR
            Milivoj Ivkovic <mi@alma.ch> or <ivkovic@csi.com>

NOTES
            You can use this freely.

            I would appreciate a short (or long) e-mail note if you do.
            And of course, bug-reports and/or improvements are welcome.

            Last revision: 14.07.98. Latest version should be available at
            http://alma.ch/perl

