File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Processing received emails with a servlet?" Watch "Processing received emails with a servlet?" New topic

Processing received emails with a servlet?

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401

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?

karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259

winay Kumar
Ranch Hand

Joined: Aug 13, 2007
Posts: 34

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

Winay Kumar<br />SCJP 5.0
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Yes, all this is possible. The JavaMail API is what you would use. The has various links to useful material, including a detailed JavaMail introduction courtesy of Sun.
I agree. Here's the link:
subject: Processing received emails with a servlet?
It's not a secret anymore!