What is the easiest way for a Java application to receive incoming email?

旧时模样 提交于 2019-12-12 07:08:51

问题


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.


回答1:


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




回答2:


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.




回答3:


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




回答4:


Review the Mail component from apache camel

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




回答5:


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:


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



来源:https://stackoverflow.com/questions/561011/what-is-the-easiest-way-for-a-java-application-to-receive-incoming-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!