I am using Postfix as a mail server and I configured it to receive emails to some destination.
I want to make a Java code that parse the incoming emails and do some action. Any idea where to start or what to use?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I see two approaches:
The imap approach lets you select unread mail, mail by id (single or multiple), move mail from one directory to an other, and so on.
Some links:
http://www.ibm.com/developerworks/linux/library/l-lexyac2.html
It is for C, but tips may be helpful for java. I mean the theoretical background.
http://www.example-code.com/java/imap.asp
This one is a collection of imap sample with java. It seems to use a lib, but in all case, it gives you an overview of what is doable with imap.
finally, there was a question about imap and java on stackoverflow:
Getting mail from GMail into Java application using IMAP