Sending email is easy with commons-email, and with spring it is even easier. What about receiving incoming email? Are there easy to use APIs that allow to bounce emails, process attachments, etc.
Asked
Active
Viewed 2.0k times
6 Answers
17
SubEthaSMTP Mail Server allows you to create your own SMTP Server for receiving emails.

yegor256
- 102,010
- 123
- 446
- 597

Peter Štibraný
- 32,463
- 16
- 90
- 116
-
1Definitely 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. – extraneon Feb 18 '09 at 13:41
5
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.

jcrossley3
- 11,576
- 4
- 31
- 32
-
1James 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. – extraneon Feb 18 '09 at 13:39
-
1James 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. – Richard Levasseur Feb 27 '09 at 18:01
2
Apache Commons Net is the perfect library to fetch mails via POP3. IMAP is not supported.

guerda
- 23,388
- 27
- 97
- 146
-
6mmm...but then I have two constantly poll the server, right? Instead of being a server and sitting idle until email arrives... – flybywire Feb 18 '09 at 13:30
-
Answer out of date perhaps? `Supported protocols include: IMAP(S)` – usr-local-ΕΨΗΕΛΩΝ May 20 '15 at 14:28