INT-1376, added documentation for 'should-mark-messages-as-read'
This commit is contained in:
@@ -92,18 +92,30 @@
|
||||
To configure an inbound Channel Adapter, you have the choice between polling or event-driven (assuming your
|
||||
mail server supports IMAP IDLE - if not, then polling is the only option). A polling Channel Adapter simply
|
||||
requires the store URI and the channel to send inbound Messages to. The URI may begin with "pop3" or "imap":
|
||||
<programlisting language="xml"><![CDATA[ <mail:inbound-channel-adapter channel="mailIn"
|
||||
store-uri="imap://usr:pwd@imap.example.com/INBOX">
|
||||
<poller max-messages-per-poll="3">
|
||||
<interval-trigger interval="30" time-unit="SECONDS"/>
|
||||
</poller>
|
||||
</mail:inbound-channel-adapter>]]></programlisting>
|
||||
<programlisting language="xml"><![CDATA[<int-mail:inbound-channel-adapter id="imapAdapter"
|
||||
store-uri="imaps://[username]:[password]@imap.gmail.com/INBOX"
|
||||
java-mail-properties="javaMailProperties"
|
||||
channel="recieveChannel"
|
||||
should-delete-messages="true"
|
||||
should-mark-messages-as-read="true"
|
||||
auto-startup="true">
|
||||
<int:poller max-messages-per-poll="1">
|
||||
<int:interval-trigger interval="5000"/>
|
||||
</int:poller>
|
||||
</int-mail:inbound-channel-adapter>]]></programlisting>
|
||||
If you do have IMAP idle support, then you may want to configure the "imap-idle-channel-adapter" element instead.
|
||||
Since the "idle" command enables event-driven notifications, no poller is necessary for this adapter. It will
|
||||
send a Message to the specified channel as soon as it receives the notification that new mail is available:
|
||||
<programlisting language="xml"><![CDATA[ <mail:imap-idle-channel-adapter channel="mailIn"
|
||||
store-uri="imaps://usr:pwd@imap.example.com:993/INBOX"/>]]></programlisting>
|
||||
<programlisting language="xml"><![CDATA[<int-mail:imap-idle-channel-adapter id="customAdapter"
|
||||
store-uri="imaps://[username]:[password]@imap.gmail.com/INBOX"
|
||||
channel="recieveChannel"
|
||||
auto-startup="true"
|
||||
should-delete-messages="false"
|
||||
should-mark-messages-as-read="true"
|
||||
java-mail-properties="javaMailProperties"/>]]></programlisting>
|
||||
</para>
|
||||
<note>When using <emphasis>should-mark-messages-as-read</emphasis> be aware of the protocol you are using ti retrieve messages. For example POP3 does not support this flag
|
||||
which means setting it to 'true' will have no effect.</note>
|
||||
<para>
|
||||
When using the namespace support, a <emphasis>header-enricher</emphasis> Message Transformer is also available.
|
||||
This simplifies the application of the headers mentioned above to any Message prior to sending to the
|
||||
|
||||
Reference in New Issue
Block a user