java程序定期检查ms Outlook是否有新邮件 [英] java program to check periodically ms outlook for new mail
问题描述
我需要Java中以下问题的解决方案-
I need the solution for the below problem in Java -
当新邮件到达ms Outlook中的特定电子邮件ID时,应该自动执行一个Web服务.
On arrival of new mail in ms outlook for a particular email id, there should be a web service get executed automatically.
有可能吗?请帮忙!
推荐答案
您可以使用Java邮件来实现.您将需要找到配置详细信息,但是用于此操作的标准代码段类似于下面的 .我复制了从这里摘录的代码. Thos的官方 javamail 链接提供了相当不错的示例集(即.如何阅读附件.
You can do that using java mail. You will need to find the configuration details but a standard code snippet for this would be something like below. I copied the code snipped from here. Thos official javamail link has a pretty decent set of examples (ie. how to read attachments).
要将电子邮件作为文件存储到文件夹,可以使用FileUtils.将电子邮件写入文件,然后将其复制到所需的文件夹中.
For storing the email as a file to a folder, you can apache FileUtils. Write the email to a file and copy it to a folder that you desire.
还有一个有趣的资源
这篇关于java程序定期检查ms Outlook是否有新邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!