How to get email attachments ?
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 ???
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.
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 ;-)
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center