Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Processing received emails with a servlet?

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 259
 
winay Kumar
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

check javax.mail* packages...
i do not know whether this suffices your requirement or not
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic