How to get email attachments ?

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to get email attachments ?

Hybrid View

  1. #1
    Join Date
    Apr 2005

    Question How to get email attachments ?

    Hi all,
    I am currently doing a project in which I supposed to download email attachments from mail account and save it into the specified folder.
    Means in detail my application should open the mail account, ask for the username, password then after authentication, should work as normal email system.....( viewing and downloding attachments are main aims. )
    Please any one help me ???

  2. #2
    Join Date
    May 2004
    Durham, UK
    The Javamail api at is written to carry out this sort of thing.

    If you really do want to write your own (apart from looking at the Javamail source code ;-)) you need to read and understand the relevant RFC (request for comments) documents which define how email works.

    for POP3 these are RFC1939 at

    and once you have retrieved the message using RETR you need to decode
    the MIME headers and format (Multipurpose internet mail extensions), this
    is described in RFC2045 at

    Be aware however that whilst writing an email client is straightforward, doing the mine stuff and attachments is quite tricky.

    Hope this helps

    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, and if they get mad, you are a mile away and you have their shoes ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center