decoding attachments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • p r e e t i

    decoding attachments

    Hello,

    I am working on a php script to archive emails from IMAP server. I can now
    copy emails to a file or send to browser. What i am looking for is some
    information on how to strip and decode attachments. is there is php
    function?

    I am not looking for a ready-made script. Just need a little insight into
    how files are encoded and decoded through php.

    Thanks in advance

    p r e e t i




  • Jon Kraft

    #2
    Re: decoding attachments

    "p r e e t i" <p.r.e.e.t.i@p. h.p.w.o.r.l.d> wrote:
    [color=blue]
    > I am working on a php script to archive emails from IMAP server. I
    > can now copy emails to a file or send to browser. What i am looking
    > for is some information on how to strip and decode attachments. is
    > there is php function?
    >
    > I am not looking for a ready-made script. Just need a little insight
    > into how files are encoded and decoded through php.[/color]

    Email attachments are Base64 encoded. Look into base64_decode() :



    HTH;
    JOn

    Comment

    • Chung Leong

      #3
      Re: decoding attachments

      Check out the note I posted ages ago in the PHP manual entry for
      imap_fetchbody:



      It's at the very bottom.

      Uzytkownik "p r e e t i" <p.r.e.e.t.i@p. h.p.w.o.r.l.d> napisal w wiadomosci
      news:EvGQb.9437 $ZJ1.9351@laker ead01...[color=blue]
      > Hello,
      >
      > I am working on a php script to archive emails from IMAP server. I can[/color]
      now[color=blue]
      > copy emails to a file or send to browser. What i am looking for is some
      > information on how to strip and decode attachments. is there is php
      > function?
      >
      > I am not looking for a ready-made script. Just need a little insight into
      > how files are encoded and decoded through php.
      >
      > Thanks in advance
      >
      > p r e e t i
      >
      >
      >
      >[/color]


      Comment

      • p.r.e.e.t.i

        #4
        Re: decoding attachments

        Hey thanks Jon and Chung. I will go through it.

        p.r.e.e.t.i



        "p r e e t i" <p.r.e.e.t.i@p. h.p.w.o.r.l.d> wrote in message
        news:EvGQb.9437 $ZJ1.9351@laker ead01...
        | Hello,
        |
        | I am working on a php script to archive emails from IMAP server. I can
        now
        | copy emails to a file or send to browser. What i am looking for is some
        | information on how to strip and decode attachments. is there is php
        | function?
        |
        | I am not looking for a ready-made script. Just need a little insight into
        | how files are encoded and decoded through php.
        |
        | Thanks in advance
        |
        | p r e e t i
        |
        |
        |
        |


        Comment

        Working...