使用 Java 解析 Postfix 中的收件箱
我使用 Postfix 作为邮件服务器,并将其配置为将电子邮件接收到某个目的地。
我想编写一个 Java 代码来解析传入的电子邮件并执行一些操作。知道从哪里开始或使用什么吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到两种方法:
imap 方法允许您选择未读邮件、按 ID(单个或多个)的邮件、将邮件从一个目录移动到另一个目录,等等。
一些链接:
http://www.ibm.com/developerworks/linux /library/l-lexyac2.html
它适用于 C,但提示可能对 java 有所帮助。我的意思是理论背景。
http://www.example-code.com/java/imap.asp
这是一个带有java的imap示例的集合。它似乎使用了一个库,但在所有情况下,它都为您提供了 imap 功能的概述。
最后,stackoverflow上有一个关于imap和java的问题:
获取使用 IMAP 将邮件从 GMail 发送到 Java 应用程序
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