title: spring receive emails without xml (using annotations only)
body: <p>I need to periodically check about 30 mailboxes and want to do this with annotations only. I know how to do it with XML files, it looks like this:</p>
  
  <pre><code>&lt;mail:inbound-channel-adapter id="ImapAdapter"
                                store-uri="imaps://${login}:${pass}@${host}:993/inbox"
                                channel="testReceiveEmailChannel"
                                should-delete-messages="false"
                                should-mark-messages-as-read="true"
                                auto-startup="true"
                                java-mail-properties="javaMailProperties"&gt;
      &lt;int:poller fixed-delay="200"
                  time-unit="SECONDS"
                  task-executor="asyncTaskExecutor"/&gt;
  &lt;/mail:inbound-channel-adapter&gt;
  
  &lt;int:channel id="testReceiveEmailChannel"&gt;
      &lt;int:interceptors&gt;
          &lt;int:wire-tap channel="logger"/&gt;
      &lt;/int:interceptors&gt;
  &lt;/int:channel&gt;
  
  &lt;int:service-activator input-channel="testReceiveEmailChannel"
                         ref="testMailReceiverService"
                         method="receive"/&gt;
  
  &lt;bean id="testMailReceiverService" class="com.myproject.email.EmailReceiverService"&gt;
      &lt;property name="mailBox" value="${login}"/&gt;
  &lt;/bean&gt;
  
  
  &lt;int:logging-channel-adapter id="logger" level="DEBUG"/&gt;
  </code></pre>
  
  <p>I know that Spring 4+ have <code>@InboundChannelAdapter</code> but I dont know how to use it. Actually I am new in Spring, so any helps very appreciated! </p>