寻找一些关于如何检索传入电子邮件(Exchange Server)进行处理的想法,如检索一些信息和调用web服务。该服务应该不断侦听新的电子邮件。到目前为止,我们正在使用Spring Boot和Apache Camel或Sprint集成来研究这个问题。在这方面找不到明确的例子。希望有人能帮上忙。
发布于 2021-05-27 23:38:09
有关电子邮件支持,请参阅Spring Integration文档:https://docs.spring.io/spring-integration/docs/current/reference/html/mail.html#mail。
MailTests
可以作为一个很好的示例,说明如何为电子邮件轮询配置Spring Integration通道适配器:https://github.com/spring-projects/spring-integration/blob/main/spring-integration-mail/src/test/java/org/springframework/integration/mail/dsl/MailTests.java。
Spring Boot环境在这一点上并不重要:邮件轮询没有任何自动配置,所以只要您使用Spring Integration推荐,一切都应该是透明的。
不幸的是,我们的官方示例仍然是一个XML,但是应该让您了解应该为IMAP或POP3配置什么以及如何配置:https://github.com/spring-projects/spring-integration-samples/tree/main/basic/mail。
发布于 2021-05-27 23:27:30
看一下这个API - https://www.independentsoft.de/jwebservices/tutorial/findmessages1.html
您可以创建Spring调度程序来轮询exchange服务器,以获取在给定时间间隔内到达的消息。
https://stackoverflow.com/questions/67724972
复制相似问题