Modified: websites/production/camel/content/camel-jmx.html
==============================================================================
--- websites/production/camel/content/camel-jmx.html (original)
+++ websites/production/camel/content/camel-jmx.html Tue Nov 13 18:22:26 2012
@@ -140,7 +140,7 @@ camel.disableJMX();
 
 <h4><a shape="rect" 
name="CamelJMX-LocatingaMBeanServerintheJavaVM"></a>Locating a MBeanServer in 
the Java VM</h4>
 
-<p>Each CamelContext can have an instance of <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html";>InstrumentationAgent</a>
 wrapped insider the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/InstrumentationLifecycleStrategy.html";>InstrumentationLifecycleStrategy</a>.
 The InstrumentationAgent is the object that interfaces with a <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html";
 rel="nofollow">MBeanServer</a> to register/unregister Camel MBeans. Multiple 
CamelContexts/InstrumentationAgents can/should share a MBeanServer. By default, 
Camel runtime picks the first MBeanServer returned by <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.S
 tring)" rel="nofollow">MBeanServerFactory.findMBeanServer method</a> that 
matches the default domain name of <b>org.apache.camel</b>.&#160; You may want 
to change the default domain name to match the MBeanServer instance that you 
are already using in your application.&#160; Especially, if your MBeanServer is 
attached to a JMX connector server, you will not need to create a connector 
server in Camel.</p>
+<p>Each CamelContext can have an instance of <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html";>InstrumentationAgent</a>
 wrapped inside the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/InstrumentationLifecycleStrategy.html";>InstrumentationLifecycleStrategy</a>.
 The InstrumentationAgent is the object that interfaces with a <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html";
 rel="nofollow">MBeanServer</a> to register/unregister Camel MBeans. Multiple 
CamelContexts/InstrumentationAgents can/should share a MBeanServer. By default, 
Camel runtime picks the first MBeanServer returned by <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.St
 ring)" rel="nofollow">MBeanServerFactory.findMBeanServer method</a> that 
matches the default domain name of <b>org.apache.camel</b>.&#160; You may want 
to change the default domain name to match the MBeanServer instance that you 
are already using in your application.&#160; Especially, if your MBeanServer is 
attached to a JMX connector server, you will not need to create a connector 
server in Camel.</p>
 
 <p>You can configure the matching default domain name via system property.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
@@ -419,7 +419,7 @@ SUNJMX=-Dcom.sun.management.jmxremote=<s
 
 <p>The Camel notification events give a coarse grained overview what is 
happening. You can see lifecycle event from context and endpoints and you can 
see exchanges being received by and sent to endpoints.</p>
 
-<p>From <b>Camel 2.4</b> you can use a customer JMX NotificationListener to 
listen the camel events.<br clear="none">
+<p>From <b>Camel 2.4</b> you can use a custom JMX NotificationListener to 
listen the camel events.<br clear="none">
 First you need to set up a JmxNotificationEventNotifier before you start the 
CamelContext.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
 <pre class="code-java"><span class="code-comment">// Set up the 
JmxNotificationEventNotifier

Modified: websites/production/camel/content/mail.html
==============================================================================
--- websites/production/camel/content/mail.html (original)
+++ websites/production/camel/content/mail.html Tue Nov 13 18:22:26 2012
@@ -158,7 +158,7 @@ smtp:<span class="code-comment">//mycomp
 
 <h3><a shape="rect" name="Mail-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Property </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>host</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"> The host name or IP address to connect to. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>port</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> See <a shape="rect" 
href="#Mail-DefaultPorts">DefaultPorts</a> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The TCP port number to connect on. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>username</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
rowspan="1" class="confluenceTd"> The user name on the email server. </td
 ></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>password</tt> 
 ></td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> The password on the email 
 >server. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>ignoreUriScheme</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> If <tt>false</tt>, Camel uses the scheme to determine 
 >the transport protocol (POP, IMAP, SMTP etc.) </td></tr><tr><td colspan="1" 
 >rowspan="1" class="confluenceTd"> <tt>defaultEncoding</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> The default encoding to use for 
 >Mime Messages. </td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>contentType</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>text/plain</tt> </td><td colspan="1
 " rowspan="1" class="confluenceTd"> The mail message content type. Use 
<tt>text/html</tt> for HTML mails. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>folderName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>INBOX</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The folder to poll. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>destination</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>username@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <b>@deprecated</b> Use the <tt>to</tt> option 
instead. The <tt>TO</tt> recipients (receivers of the email). </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>to</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>username@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma. </td></tr><tr><td colspa
 n="1" rowspan="1" class="confluenceTd"> <tt>replyTo</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>alias@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> As of <b>Camel 2.8.4, 2.9.1+</b>, the 
Reply-To recipients (the receivers of the response mail). Separate multiple 
email addresses with a comma. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>CC</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd">The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>BCC</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The BCC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt
 >from</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>camel@localhost</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> The FROM email address. </td></tr><tr><td colspan="1" 
 >rowspan="1" class="confluenceTd"> <tt>subject</tt> </td><td colspan="1" 
 >rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> As of <b>Camel 2.3</b>, the Subject of the message 
 >being sent. Note: Setting the subject in the header takes precedence over 
 >this option. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>delete</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Deletes 
 >the messages after they have been processed. This is done by setting the 
 ><tt>DELETED</tt> flag on the mail message. If <tt>false</tt>, the 
 ><tt>SEEN</tt> flag is set instead. As of <b>Camel 2.10</b> you can override 
 >this configuration option by setting a header with the ke
 y <tt>delete</tt> to determine if the mail should be deleted or not. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>unseen</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> It is possible to configure a 
consumer endpoint so that it processes only unseen messages (that is, new 
messages) or all messages. Note that Camel always skips deleted messages. The 
default option of <tt>true</tt> will filter to only unseen messages.  POP3 does 
not support the <tt>SEEN</tt> flag, so this option is not supported in POP3; 
use IMAP instead. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>copyTo</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <b>Camel 2.10:</b> Consumer only. After processing a mail 
message, it can be copied to a mail folder with the given name. You can 
override this configurati
 on value, with a header with the key <tt>copyTo</tt>, allowing you to copy 
messages to folder names configured at runtime. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>fetchSize</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets the maximum number of messages to consume during a 
poll. This can be used to avoid overloading a mail server, if a mailbox folder 
contains a lot of messages. Default value of <tt>-1</tt> means no fetch size 
and all messages will be consumed. Setting the value to 0 is a special corner 
case, where Camel will not consume any messages at all. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>alternativeBodyHeader</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>CamelMailAlternativeBody</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the key to an IN message header that contains 
an alternative email
  body. For example, if you send emails in <tt>text/html</tt> format and want 
to provide an alternative mail body for non-HTML email clients, set the 
alternative mail body with this key as a header. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>debugMode</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Enable debug mode on the underlying mail 
framework. The SUN Mail framework logs the debug messages to 
<tt>System.out</tt> by default. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>connectionTimeout</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>30000</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> The connection timeout in milliseconds. 
Default is 30 seconds. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><
 td colspan="1" rowspan="1" class="confluenceTd"> Milliseconds before the 
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.delay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>60000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 
will poll the mailbox only once a minute by default to avoid overloading the 
mail server. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Set to <tt>true</tt> to use a fixed delay between polls, 
otherwise fixed rate is used. See <a shape="rect" class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html";
 rel="nofollow">ScheduledExecutorService</a> in JDK for details. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect<
 /tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.8.3/2.9:</b> 
Whether the consumer should disconnect after polling. If enabled this forces 
Camel to connect on each poll. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>mail.XXX</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Set any <a shape="rect" class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">additional java mail properties</a>. For instance if you want to 
set a special property when using POP3 you can now provide the option directly 
in the URI such as: <tt>mail.pop3.forgettopheaders=true</tt>. You can set 
multiple such options, for example: 
<tt>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</tt>. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <
 tt>mapMailMessage</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 
2.8:</b> Specifies whether Camel should map the received mail message to Camel 
body/headers. If set to true, the body of the mail message is mapped to the 
body of the Camel IN message and the mail headers are mapped to IN headers. If 
this option is set to false then the IN message contains a raw 
<tt>javax.mail.Message</tt>. You can retrieve this raw message by calling 
<tt>exchange.getIn().getBody(javax.mail.Message.class)</tt>. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Specifies the maximum number of 
messages to gather per poll. By default, no maximum is set. Can be used to set 
a limit of e.g. 1000 to avoid downloading thousands of files when the server 
 starts up. Set a value of 0 or negative to disable this option. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>javaMailSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies 
a pluggable <tt>org.springframework.mail.javamail.JavaMailSender</tt> instance 
in order to use a custom email implementation. If none provided, Camel uses the 
default <tt>org.springframework.mail.javamail.JavaMailSenderImpl</tt>. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>ignoreUnsupportedCharset</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Option to let Camel ignore unsupported charset in the 
local JVM when sending mails. If the charset is unsupported then 
<tt>charset=XXX</tt> (where <tt>XXX</tt> represents the unsupported charset) is 
removed from the <tt>content-type</tt> and it relie
 s on the platform default instead. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>sslContextParameters</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <b>Camel 2.10:</b> Reference to a 
<tt>org.apache.camel.util.jsse.SSLContextParameters</tt> in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any configured SSLContextParameters at the component level.&#160; See 
<a shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Property </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>host</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"> The host name or IP address to connect to. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>port</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> See <a shape="rect" 
href="#Mail-DefaultPorts">DefaultPorts</a> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The TCP port number to connect on. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>username</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
rowspan="1" class="confluenceTd"> The user name on the email server. </td
 ></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>password</tt> 
 ></td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> The password on the email 
 >server. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>ignoreUriScheme</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> If <tt>false</tt>, Camel uses the scheme to determine 
 >the transport protocol (POP, IMAP, SMTP etc.) </td></tr><tr><td colspan="1" 
 >rowspan="1" class="confluenceTd"> <tt>defaultEncoding</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
 >colspan="1" rowspan="1" class="confluenceTd"> The default encoding to use for 
 >Mime Messages. </td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>contentType</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> <tt>text/plain</tt> </td><td colspan="1
 " rowspan="1" class="confluenceTd"> The mail message content type. Use 
<tt>text/html</tt> for HTML mails. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>folderName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>INBOX</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The folder to poll. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>destination</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>username@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <b>@deprecated</b> Use the <tt>to</tt> option 
instead. The <tt>TO</tt> recipients (receivers of the email). </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>to</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>username@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma. </td></tr><tr><td colspa
 n="1" rowspan="1" class="confluenceTd"> <tt>replyTo</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>alias@host</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> As of <b>Camel 2.8.4, 2.9.1+</b>, the 
Reply-To recipients (the receivers of the response mail). Separate multiple 
email addresses with a comma. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>CC</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd">The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>BCC</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The BCC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt
 >from</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>camel@localhost</tt> </td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> The FROM email address. </td></tr><tr><td colspan="1" 
 >rowspan="1" class="confluenceTd"> <tt>subject</tt> </td><td colspan="1" 
 >rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
 >class="confluenceTd"> As of <b>Camel 2.3</b>, the Subject of the message 
 >being sent. Note: Setting the subject in the header takes precedence over 
 >this option. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>delete</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
 ><tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Deletes 
 >the messages after they have been processed. This is done by setting the 
 ><tt>DELETED</tt> flag on the mail message. If <tt>false</tt>, the 
 ><tt>SEEN</tt> flag is set instead. As of <b>Camel 2.10</b> you can override 
 >this configuration option by setting a header with the ke
 y <tt>delete</tt> to determine if the mail should be deleted or not. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>unseen</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> It is possible to configure a 
consumer endpoint so that it processes only unseen messages (that is, new 
messages) or all messages. Note that Camel always skips deleted messages. The 
default option of <tt>true</tt> will filter to only unseen messages.  POP3 does 
not support the <tt>SEEN</tt> flag, so this option is not supported in POP3; 
use IMAP instead. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>copyTo</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <b>Camel 2.10:</b> Consumer only. After processing a mail 
message, it can be copied to a mail folder with the given name. You can 
override this configurati
 on value, with a header with the key <tt>copyTo</tt>, allowing you to copy 
messages to folder names configured at runtime. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>fetchSize</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets the maximum number of messages to consume during a 
poll. This can be used to avoid overloading a mail server, if a mailbox folder 
contains a lot of messages. Default value of <tt>-1</tt> means no fetch size 
and all messages will be consumed. Setting the value to 0 is a special corner 
case, where Camel will not consume any messages at all. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>alternativeBodyHeader</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>CamelMailAlternativeBody</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the key to an IN message header that contains 
an alternative email
  body. For example, if you send emails in <tt>text/html</tt> format and want 
to provide an alternative mail body for non-HTML email clients, set the 
alternative mail body with this key as a header. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>debugMode</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Enable debug mode on the underlying mail 
framework. The SUN Mail framework logs the debug messages to 
<tt>System.out</tt> by default. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>connectionTimeout</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>30000</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> The connection timeout in milliseconds. 
Default is 30 seconds. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><
 td colspan="1" rowspan="1" class="confluenceTd"> Milliseconds before the 
polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.delay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>60000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 
will poll the mailbox only once a minute by default to avoid overloading the 
mail server. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useFixedDelay</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Set to <tt>true</tt> to use a fixed delay between polls, 
otherwise fixed rate is used. See <a shape="rect" class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html";
 rel="nofollow">ScheduledExecutorService</a> in JDK for details. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect<
 /tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.8.3/2.9:</b> 
Whether the consumer should disconnect after polling. If enabled this forces 
Camel to connect on each poll. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>mail.XXX</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Set any <a shape="rect" class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">additional java mail properties</a>. For instance if you want to 
set a special property when using POP3 you can now provide the option directly 
in the URI such as: <tt>mail.pop3.forgettopheaders=true</tt>. You can set 
multiple such options, for example: 
<tt>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</tt>. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <
 tt>mapMailMessage</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 
2.8:</b> Specifies whether Camel should map the received mail message to Camel 
body/headers. If set to true, the body of the mail message is mapped to the 
body of the Camel IN message and the mail headers are mapped to IN headers. If 
this option is set to false then the IN message contains a raw 
<tt>javax.mail.Message</tt>. You can retrieve this raw message by calling 
<tt>exchange.getIn().getBody(javax.mail.Message.class)</tt>. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Specifies the maximum number of 
messages to gather per poll. By default, no maximum is set. Can be used to set 
a limit of e.g. 1000 to avoid downloading thousands of files when the server 
 starts up. Set a value of 0 or negative to disable this option. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>javaMailSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies 
a pluggable <tt>org.springframework.mail.javamail.JavaMailSender</tt> instance 
in order to use a custom email implementation. If none provided, Camel uses the 
default <tt>org.springframework.mail.javamail.JavaMailSenderImpl</tt>. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>ignoreUnsupportedCharset</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Option to let Camel ignore unsupported charset in the 
local JVM when sending mails. If the charset is unsupported then 
<tt>charset=XXX</tt> (where <tt>XXX</tt> represents the unsupported charset) is 
removed from the <tt>content-type</tt> and it relie
 s on the platform default instead. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>sslContextParameters</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <b>Camel 2.10:</b> Reference to a 
<tt>org.apache.camel.util.jsse.SSLContextParameters</tt> in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any configured SSLContextParameters at the component level.&#160; See 
<a shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>searchTerm</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <b>Camel 2.11:</b> Refers to a 
<tt>javax.mail.search.SearchTerm</tt> wh
 ich allows to filter mails based on search criteria such as subject, body, 
from, sent after a certain date etc. See further below for examples. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>searchTerm.xxx</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 
2.11:</b> To configure search terms directly from the endpoint uri, which 
supports a limited number of terms defined by the 
<tt>org.apache.camel.component.mail.SimpleSearchTerm</tt> class. See further 
below for examples. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -429,6 +429,66 @@ from(<span class="code-quote">"imaps:<sp
 </div></div>
 
 
+<h3><a shape="rect" name="Mail-UsingcustomSearchTerm"></a>Using custom 
SearchTerm</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>You can configure a <tt>searchTerm</tt> on the <tt>MailEndpoint</tt> which 
allows you to filter out unwanted mails. </p>
+
+<p>For example to filter mails to contain Camel in either Subject or Text you 
can do as follows:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+  <span class="code-tag">&lt;from uri=<span 
class="code-quote">"imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm.subjectOrBody=Camel"</span>/&gt;</span>
+  <span class="code-tag">&lt;to uri=<span 
class="code-quote">"bean:myBean"</span>/&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>Notice we use the <tt>"searchTerm.subjectOrBody"</tt> as parameter key to 
indicate that we want to search on mail subject or body, to contain the word 
"Camel".<br clear="none">
+The class <tt>org.apache.camel.component.mail.SimpleSearchTerm</tt> has a 
number of options you can configure:</p>
+
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> unseen </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Whether to limit by unseen mails only. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> subjectOrBody </td><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> To limit by subject or body to 
contain the word. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> subject </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The subject must contain the word. </td></tr><tr><td 
colspan="1" rowspan="1" cl
 ass="confluenceTd"> body </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The body must contain the word. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> from </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> The mail must be from a given email pattern. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> to </td><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> The mail must be to a given email 
pattern. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
fromSentDate </td><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The mail 
must be sent after or equals (GE) a given date. The date pattern is 
<tt>yyyy-MM-dd HH:mm:SS</tt>, eg use <tt>"2012-01-01 00:00
 :00"</tt> to be from the year 2012 onwards. You can use <tt>"now"</tt> for 
current timestamp. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> toSentDate </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The mail must be sent before or equals (BE) a given date. 
The date pattern is <tt>yyyy-MM-dd HH:mm:SS</tt>, eg use <tt>"2012-01-01 
00:00:00"</tt> to be before the year 2012. You can use <tt>"now"</tt> for 
current timestamp. </td></tr></tbody></table>
+</div>
+</div>
+
+<p>The <tt>SimpleSearchTerm</tt> is designed to be easily configurable from a 
POJO, so you can also configure it using a &lt;bean&gt; style in XML</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">
+&lt;bean id=<span class="code-quote">"mySearchTerm"</span> class=<span 
class="code-quote">"org.apache.camel.component.mail.SimpleSearchTerm"</span>&gt;
+  &lt;property name=<span class="code-quote">"subject"</span> value=<span 
class="code-quote">"Order"</span>/&gt;
+  &lt;property name=<span class="code-quote">"to"</span> value=<span 
class="code-quote">"[email protected]"</span>/&gt;
+  &lt;property name=<span class="code-quote">"fromSentDate"</span> value=<span 
class="code-quote">"now"</span>/&gt;
+ &lt;/bean&gt;
+</pre>
+</div></div>
+
+<p>You can then refer to this bean, using #beanId in your Camel route as 
shown:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;route&gt;</span>
+  <span class="code-tag">&lt;from uri=<span 
class="code-quote">"imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm=#mySearchTerm"</span>/&gt;</span>
+  <span class="code-tag">&lt;to uri=<span 
class="code-quote">"bean:myBean"</span>/&gt;</span>
+<span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
+
+<p>In Java there is a builder class to build compound <tt>SearchTerm}}s using 
the {{org.apache.camel.component.mail.SearchTermBuilder</tt> class.<br 
clear="none">
+This allows you to build complex terms such as:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">
+<span class="code-comment">// we just want the unseen mails which is not spam
+</span>SearchTermBuilder builder = <span class="code-keyword">new</span> 
SearchTermBuilder();
+
+builder.unseen().body(Op.not, <span 
class="code-quote">"Spam"</span>).subject(Op.not, <span 
class="code-quote">"Spam"</span>)
+  <span class="code-comment">// which was sent from either foo or bar
+</span>  .from(<span 
class="code-quote">"[email protected]"</span>).from(Op.or, <span 
class="code-quote">"[email protected]"</span>);
+  <span class="code-comment">// .. and we could <span 
class="code-keyword">continue</span> building the terms
+</span>
+SearchTerm term = builder.build();
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="Mail-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring 
Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" 
title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" 
title="Endpoint">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html" title="Getting Started">Getting 
Started</a></li></ul>
 </div>


Reply via email to