1
Spring 통합 메일을 사용하여 Gmail 계정으로 들어오는 메시지를 받고 있습니다. 메일은 문제없이 수신되지만 내 Gmail 계정에 항상 읽음으로 표시됩니다. 스프링 통합은 수신 된 메시지를 항상 읽음으로 표시합니다.
<int:channel id="receiveChannel"/>
replace 'userid and 'password' with the real values
<int-mail:imap-idle-channel-adapter id="customAdapter"
store-uri="imaps://proximahaiz%40gmail.com:[email protected]:993/inbox"
channel="receiveChannel"
auto-startup="true"
should-delete-messages="false"
should-mark-messages-as-read="false"
java-mail-properties="javaMailProperties"
/>
<util:properties id="javaMailProperties">
<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
<prop key="mail.imap.socketFactory.fallback">false</prop>
<prop key="mail.store.protocol">imaps</
<prop key="mail.debug">false</prop>
</
내가 해야-마크 메시지-으로 읽기 = "false"를하지만 모든 수신 메시지는 여전히 읽기로 표시된 매개 변수를 추가 : 여기 내 XML 구성입니다. 4.2.9.RELEASE 버전의 Spring Integration을 사용합니다. 내 응용 프로그램에 그들을받은 후
public class GmailInboundImapIdleAdapterServiceImpl implements GmailInboundImapIdleAdapterService {
private static Logger logger = Logger.getLogger(GmailInboundImapIdleAdapterServiceImpl.class);
private static String MAIL_SUBJECT = "mail_subject";
private static String MAIL_FROM = "mail_from";
private static EmailParser emailParser = new EmailParser();
@Autowired
private EmailReceiverService emailReceiverService;
@Override
public void startReceiveEmails() {
ApplicationContext acProxy = new ClassPathXmlApplicationContext("/integration/gmail-imap-idle-config-proxytest.xml");
DirectChannel inputChannelProxy = acProxy.getBean("receiveChannel", DirectChannel.class);
inputChannelProxy.subscribe(new MessageHandler() {
@Override
public void handleMessage(Message<?> message) throws MessagingException {
initMessageReceiving(message);
}
});
}
내가 메시지를 남겨 할까는 Gmail 계정에서 읽지 않은 상태로 표시 : 이 내 자바 코드?
그리고 SELECT가 아닌 FETCH 또는 EXAMINE이 아닌 FETCH.PEEK를 사용해야합니다. – Max
빠른 응답을 보내 주셔서 감사합니다. 업로드 된 로그, 보이지 않고 뭐가 잘못 됐는지 말할 수 없습니까? –
더 많은 로그를 표시해야합니다. 그것은 단지 검색을 보여줍니다. 전체 내용을 텍스트 파일로 업로드 할 수 없습니까? –