使用java mail api,我们监控收件箱文件夹并处理电子邮件。如果在处理电子邮件时发生错误,我们会将其移至错误文件夹。
如果成功,我们会从收件箱文件夹中删除该电子邮件。以下是邮件调试的片段。它将副本显示为成功,但从未在错误目录中找到该电子邮件,并且该邮件也已从收件箱中删除。
为什么会这样?另外,即使没有复制邮件,为什么java邮件api会报告成功。
2013-10-04 14:25:20,886 [] [] [] INFO [monitorScheduler-1] monitor.EmailMonitor monitor.EmailMonitor (EmailMonitor.java:393) - Copy error message to error folder
2013-10-04 14:25:20,889 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - A10 COPY 1 Inbox/error
2013-10-04 14:25:20,896 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - A10 OK COPY completed.
2013-10-04 14:25:20,897 [] [] [] INFO [monitorScheduler-1] monitor.EmailMonitor monitor.EmailMonitor (EmailMonitor.java:400) - Mark message as deleted from monitored folder
2013-10-04 14:25:20,897 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - A11 STORE 1 +FLAGS (\Deleted)
2013-10-04 14:25:20,907 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - * 1 FETCH (FLAGS (\Seen \Deleted \Recent))
A11 OK STORE completed.
2013-10-04 14:25:20,907 [] [] [] INFO [monitorScheduler-1] monitor.EmailMonitor monitor.EmailMonitor (EmailMonitor.java:404) - Expunge the monitored folder
2013-10-04 14:25:20,908 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - A12 EXPUNGE
2013-10-04 14:25:20,922 [] [] [] INFO [monitorScheduler-1] STDOUT util.LoggerStream (LoggerStream.java:156) - * 1 EXPUNGE
* 0 EXISTS
A12 OK EXPUNGE completed.
答案 0 :(得分:0)
这是您的服务器报告成功。
尝试为错误文件夹使用不同的名称,而不是在收件箱中指定的名称,以防有帮助。