What is the easiest way for a Java application to

2019-01-31 14:01发布

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.

6条回答
太酷不给撩
2楼-- · 2019-01-31 14:51

Review the Mail component from apache camel

http://camel.apache.org/mail.html

查看更多
姐就是有狂的资本
3楼-- · 2019-01-31 14:55

Apache Commons Net is the perfect library to fetch mails via POP3. IMAP is not supported.

查看更多
神经病院院长
4楼-- · 2019-01-31 14:59

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.

查看更多
Ridiculous、
5楼-- · 2019-01-31 15:00

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.

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-31 15:01

SubEthaSMTP Mail Server allows you to create your own SMTP Server for receiving emails.

查看更多
祖国的老花朵
7楼-- · 2019-01-31 15:06

Check jGuru's JavaMail tutorial here. There are ways to read and detach attachments.

查看更多
登录 后发表回答