Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9072523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:11:22+00:00 2026-06-16T18:11:22+00:00

I am using spring integration to retrieve emails using imap the following is my

  • 0

I am using spring integration to retrieve emails using imap the following is my configuration: I am using spring-integration version 1.0.4.RELEASE, I am sticking to this version because my spring version is 2.5 which I don’t want to change (will take high effort to do).

Question
If I put any of the following attributes in inbound-channel-adapter then I am getting the following exception.
should-delete-messages=”false”
should-mark-messages-as-read=”true”

Exception in thread “main” org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 125 in XML document from class path resource [META-INF/spring/component.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute ‘should-delete-messages’ is not allowed to appear in element ‘mail:inbound-channel-adapter’.

Also whenever I process an email the corresponding email is getting deleted from outlook mailbox. Is this attribute not supported in Version 1.0.4? If yes then how to achieve the similar functionality?

<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>
    <prop key="mail.debug">false</prop>
</util:properties>

<mail:inbound-channel-adapter id="imapAdapter"
                                  store-uri="imaps://username:password@mydomain:993/inbox"                                    
                                  channel="recieveEmailChannel"
                                  auto-startup="true"
                                  java-mail-properties="javaMailProperties">
    <int:poller> 
    <int:interval-trigger initial-delay="1000" interval="2000"
    fixed-rate="true"/>
    </int:poller>
</mail:inbound-channel-adapter>
<int:channel id="recieveEmailChannel" />        
<int:service-activator input-channel="recieveEmailChannel" ref="emailReceiverService" method="receive"/>
<bean id="emailReceiverService" class="com.mydomain.email.in.DefaultEmailReceiverUtilService">
</bean>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T18:11:23+00:00Added an answer on June 16, 2026 at 6:11 pm

    Resolved by using imap-idle-channel-adapter instead of inbound-channel-adapter as follows:

    <mail:imap-idle-channel-adapter id="imapAdapter"
                                      store-uri="imaps://username:password@mydomain:993/inbox"                                    
                                      channel="recieveEmailChannel"
                                      should-delete-messages="false"
                                      auto-startup="true"
                                      java-mail-properties="javaMailProperties" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing web application supported by Spring Integration. I'm using 1.0.4.RELEASE. I use CGLib
I'm using WCF through Spring.net WCF integration link text This works relatively fine, however
I don't understand something. I'm using Spring Integration to send and receive messages from
I'm using spring integration to communicate via active mq. I've got the following config.
I'm developing web app using Spring Integration to route my messages, but I have
Hi I am using spring jdbctemplate to invoke an oracle function which takes an
i am using spring 3.1.0.RELEASE , and my servlet container is tomcat 7 and
I need to execute ETL operation on large data package using spring integration. For
I am using Spring Integration to make a POST REST WebService call My outbound
I am using spring 2.5.6 and spring-integration 1.0.3 and MQ client 6.0.2.2 I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.