This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Other JSE/JEE APIs and the fly likes Processing received emails with a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Processing received emails with a servlet?" Watch "Processing received emails with a servlet?" New topic
Author

Processing received emails with a servlet?

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Hiya,

Is it possible to create a servlet that:

1. Checks a POP mail server for new email
2. Retrieves that email
3. Extracts any attached files from the email
(then processes that file...)

If it is, can anyone point me in the direction of the APIs I'd need and, if poss, any sample code?

Cheers,
James
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
http://java.sun.com/products/javamail/


http://www.skillassert.com


winay Kumar
Ranch Hand

Joined: Aug 13, 2007
Posts: 34
Hi,

check javax.mail* packages...
i do not know whether this suffices your requirement or not


Winay Kumar<br />SCJP 5.0
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Yes, all this is possible. The JavaMail API is what you would use. The http://faq.javaranch.com/java/JavaEnterpriseEditionFaq has various links to useful material, including a detailed JavaMail introduction courtesy of Sun.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Processing received emails with a servlet?