PHP email parser?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sugapablo

    #1

    PHP email parser?

    Before I laboriously write one, I was trying to find a PHP script that
    would take an email spool file and parse it, putting each part into an
    array (including attachments).

    The eventual goal would be to take each individual array element and put
    them into a MySQL database.

    I've searched a bit and can't find one. Anyone know of one?


    --
    [ Sugapablo ]
    [ http://www.sugapablo.net <--personal | http://www.sugapablo.com <--music ]
    [ http://www.2ra.org <--political | http://www.subuse.net <--discuss ]

  • Daniel Tryba

    #2
    Re: PHP email parser?

    Sugapablo <russ@removesug apablo.com> wrote:[color=blue]
    > Before I laboriously write one, I was trying to find a PHP script that
    > would take an email spool file and parse it, putting each part into an
    > array (including attachments).[/color]

    An email spool file... what do you mean with that? IMHO email spool
    files are things you shouldn't touch since they are under control of a
    smtpd. And I guess that the spoolfiles are different for different
    smtp daemons.

    Comment

    • Sugapablo

      #3
      Re: PHP email parser?

      On Sat, 23 Apr 2005 12:38:38 +0000, Daniel Tryba wrote:
      [color=blue]
      > An email spool file... what do you mean with that? IMHO email spool
      > files are things you shouldn't touch since they are under control of a
      > smtpd. And I guess that the spoolfiles are different for different
      > smtp daemons.[/color]

      Excuse me. I mean more properly, the mbox files stored in your $HOME
      directory for apps like pine.


      --
      [ Sugapablo ]
      [ http://www.sugapablo.net <--personal | http://www.sugapablo.com <--music ]
      [ http://www.2ra.org <--political | http://www.subuse.net <--discuss ]

      Comment

      • Daniel Tryba

        #4
        Re: PHP email parser?

        Sugapablo <russ@removesug apablo.com> wrote:[color=blue][color=green]
        >> An email spool file... what do you mean with that? IMHO email spool
        >> files are things you shouldn't touch since they are under control of a
        >> smtpd. And I guess that the spoolfiles are different for different
        >> smtp daemons.[/color]
        >
        > Excuse me. I mean more properly, the mbox files stored in your $HOME
        > directory for apps like pine.[/color]

        The IMAP module could be used AFAIK (according to the imap_open user
        notes by supplying an absolute path to the mbox). imap_structure can be
        used to construct the array you need.

        But also I remember Manuel Lemos posting some class to do this to a
        similar question.

        Comment

        • Mladen Gogala

          #5
          Re: PHP email parser?

          On Sat, 23 Apr 2005 09:15:43 -0400, Sugapablo wrote:
          [color=blue]
          > On Sat, 23 Apr 2005 12:38:38 +0000, Daniel Tryba wrote:
          >[color=green]
          >> An email spool file... what do you mean with that? IMHO email spool
          >> files are things you shouldn't touch since they are under control of a
          >> smtpd. And I guess that the spoolfiles are different for different
          >> smtp daemons.[/color]
          >
          > Excuse me. I mean more properly, the mbox files stored in your $HOME
          > directory for apps like pine.[/color]

          Try with Mail_Mime PEAR package. They also have an example.

          --
          Egoist: A person of low taste, more interested in themselves than in me.

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: PHP email parser?

            Sugapablo wrote:[color=blue]
            > Before I laboriously write one, I was trying to find a PHP script[/color]
            that[color=blue]
            > would take an email spool file and parse it, putting each part into[/color]
            an[color=blue]
            > array (including attachments).
            >
            > The eventual goal would be to take each individual array element and[/color]
            put[color=blue]
            > them into a MySQL database.
            >
            > I've searched a bit and can't find one. Anyone know of one?[/color]



            --
            <?php echo 'Just another PHP saint'; ?>
            Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

            Comment

            Working...