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 ?

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    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
    Location
    Durham, UK
    Posts
    174
    The Javamail api at http://java.sun.com/products/javamail/ 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 http://rfc.net/rfc1939.html

    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 http://rfc.net/rfc2045.html

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

    Enjoy
    Hope this helps
    Graham

    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 ;-)

    http://www.grahamrobinsonsoftware.com

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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