How To Receive Email In A Java App
6 Answers 6
yegor256
96.5k 110 gold badges 421 silver badges 566 bronze badges
answered Feb 18 '09 at 13:36
Peter ŠtibranýPeter Štibraný
31.6k 16 gold badges 87 silver badges 115 bronze badges
1
|
James is probably your best bet, but email handling is extremely complex, requiring not only configuration of your MTA (the James server), but also DNS. In the past, I've found it easier to initiate my handlers via hooks from non-Java MTA's like postfix. And procmail might also be useful to you. For a Java MTA though, James rocks.
answered Feb 18 '09 at 13:19
jcrossley3jcrossley3
11.1k 4 gold badges 29 silver badges 32 bronze badges
2
-
James is a very complex product. If you only need to receive e-mail, and don't need anything else, use SubEthaSMTP. If you don't have experience wirth James, use SubEthaSMTP and a real e-mail server (postfix) in front of it and let that handle the complex stuff.
Feb 18 '09 at 13:39
-
James is very complex, and it has little subtleties one has to be aware of while configuring its (very, very verbose) xml file. If you need a mail server in java, James will work. If you need an application mail server, SubEtha+postfix will be much easier and sane.
Feb 27 '09 at 18:01
|
Apache Commons Net is the perfect library to fetch mails via POP3. IMAP is not supported.
answered Feb 18 '09 at 13:24
guerdaguerda
21.8k 25 gold badges 91 silver badges 143 bronze badges
2
-
mmm...but then I have two constantly poll the server, right? Instead of being a server and sitting idle until email arrives...
Feb 18 '09 at 13:30
-
Answer out of date perhaps?
Supported protocols include: IMAP(S)
May 20 '15 at 14:28
|
answered Dec 20 '12 at 15:51
UrobeUrobe
270 3 silver badges 7 bronze badges
See if Sun's own JavaMail (API docs) suits your needs.
I'm not sure about easiest, but at least it is a widely used way.
answered Feb 18 '09 at 13:32
JonikJonik
76.2k 67 gold badges 251 silver badges 360 bronze badges
Check jGuru's JavaMail tutorial here. There are ways to read and detach attachments.
answered Feb 18 '09 at 14:47
n002213fn002213f
7,560 13 gold badges 65 silver badges 103 bronze badges
This site is temporarily in read-only mode and not accepting new answers.
Not the answer you're looking for? Browse other questions tagged java smtp email smtpd .
How To Receive Email In A Java App
Source: https://stackoverflow.com/questions/561011/what-is-the-easiest-way-for-a-java-application-to-receive-incoming-email
Posted by: millergooft1986.blogspot.com
Definitely a very clean and accessible product. I have some experience with it and I can say there are not many libraries which are so easily integrated.
Feb 18 '09 at 13:41