You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/03/05 04:44:17 UTC

svn commit: r900078 - in /websites/production/camel/content: cache/main.pageCache mail.html

Author: buildbot
Date: Wed Mar  5 03:44:16 2014
New Revision: 900078

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/mail.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/mail.html
==============================================================================
--- websites/production/camel/content/mail.html (original)
+++ websites/production/camel/content/mail.html Wed Mar  5 03:44:16 2014
@@ -86,127 +86,60 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Mail-MailComponent">Mail Component</h2>
-
-<p>The mail component provides access to Email via Spring's Mail support and the underlying JavaMail system.</p>
-
-<p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 id="Mail-MailComponent">Mail Component</h2><p>The mail component provides access to Email via Spring's Mail support and the underlying JavaMail system.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-mail&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-    <div class="aui-message problem shadowed information-macro">
+</div></div>    <div class="aui-message problem shadowed information-macro">
                     <p class="title">Geronimo mail .jar</p>
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>We have discovered that the geronimo mail <code>.jar</code> (v1.6) has a bug when polling mails with attachments. It cannot correctly identify the <code>Content-Type</code>. So, if you attach a <code>.jpeg</code> file to a mail and you poll it, the <code>Content-Type</code> is resolved as <code>text/plain</code> and not as <code>image/jpeg</code>. For that reason, we have added an <code>org.apache.camel.component.ContentTypeResolver</code> SPI interface which enables you to provide your own implementation and fix this bug by returning the correct Mime type based on the file name. So if the file name ends with <code>jpeg/jpg</code>, you can return <code>image/jpeg</code>.</p>
-
-<p>You can set your custom resolver on the <code>MailComponent</code> instance or on the <code>MailEndpoint</code> instance.</p>
+                            <p>We have discovered that the geronimo mail <code>.jar</code> (v1.6) has a bug when polling mails with attachments. It cannot correctly identify the <code>Content-Type</code>. So, if you attach a <code>.jpeg</code> file to a mail and you poll it, the <code>Content-Type</code> is resolved as <code>text/plain</code> and not as <code>image/jpeg</code>. For that reason, we have added an <code>org.apache.camel.component.ContentTypeResolver</code> SPI interface which enables you to provide your own implementation and fix this bug by returning the correct Mime type based on the file name. So if the file name ends with <code>jpeg/jpg</code>, you can return <code>image/jpeg</code>.</p><p>You can set your custom resolver on the <code>MailComponent</code> instance or on the <code>MailEndpoint</code> instance.</p>
                     </div>
     </div>
-
-
     <div class="aui-message success shadowed information-macro">
                     <p class="title">POP3 or IMAP</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>POP3 has some limitations and end users are encouraged to use IMAP if possible.</p>
+                            <p>POP3 has some limitations and end users are encouraged to use IMAP if possible.</p>
                     </div>
     </div>
-
-
     <div class="aui-message hint shadowed information-macro">
                     <p class="title">Using mock-mail for testing</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>You can use a mock framework for unit testing, which allows you to test without the need for a real mail server. However you should remember to not include the mock-mail when you go into production or other environments where you need to send mails to a real mail server. Just the presence of the mock-javamail.jar on the classpath means that it will kick in and avoid sending the mails.</p>
+                            <p>You can use a mock framework for unit testing, which allows you to test without the need for a real mail server. However you should remember to not include the mock-mail when you go into production or other environments where you need to send mails to a real mail server. Just the presence of the mock-javamail.jar on the classpath means that it will kick in and avoid sending the mails.</p>
                     </div>
     </div>
-
-
-<h3 id="Mail-URIformat">URI format</h3>
-
-<p>Mail endpoints can have one of the following URI formats (for the protocols, SMTP, POP3, or IMAP, respectively):</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-smtp://[username@]host[:port][?options]
+<h3 id="Mail-URIformat">URI format</h3><p>Mail endpoints can have one of the following URI formats (for the protocols, SMTP, POP3, or IMAP, respectively):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[smtp://[username@]host[:port][?options]
 pop3://[username@]host[:port][?options]
 imap://[username@]host[:port][?options]
 ]]></script>
-</div></div>
-
-<p>The mail component also supports secure variants of these protocols (layered over SSL). You can enable the secure protocols by adding <code>s</code> to the scheme:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-smtps://[username@]host[:port][?options]
+</div></div><p>The mail component also supports secure variants of these protocols (layered over SSL). You can enable the secure protocols by adding <code>s</code> to the scheme:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[smtps://[username@]host[:port][?options]
 pop3s://[username@]host[:port][?options]
 imaps://[username@]host[:port][?options]
 ]]></script>
-</div></div>
-
-<p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p>
-
-<h4 id="Mail-Sampleendpoints">Sample endpoints</h4>
-
-<p>Typically, you specify a URI with login credentials as follows (taking SMTP as an example):</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-smtp://[username@]host[:port][?password=somepwd]
+</div></div><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h4 id="Mail-Sampleendpoints">Sample endpoints</h4><p>Typically, you specify a URI with login credentials as follows (taking SMTP as an example):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[smtp://[username@]host[:port][?password=somepwd]
 ]]></script>
-</div></div>
-
-<p>Alternatively, it is possible to specify both the user name and the password as query options:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-smtp://host[:port]?password=somepwd&amp;username=someuser
+</div></div><p>Alternatively, it is possible to specify both the user name and the password as query options:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[smtp://host[:port]?password=somepwd&amp;username=someuser
 ]]></script>
-</div></div>
-
-<p>For example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-smtp://mycompany.mailserver:30?password=tiger&amp;username=scott
+</div></div><p>For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[smtp://mycompany.mailserver:30?password=tiger&amp;username=scott
 ]]></script>
-</div></div>
-
-<h4 id="Mail-DefaultPortsDefaultports"><span class="confluence-anchor-link" id="Mail-DefaultPorts"></span>Default ports</h4>
-
-<p>Default port numbers are supported. If the port number is omitted, Camel determines the port number to use based on the protocol.</p>
-<div class="confluenceTableSmall">
+</div></div><h4 id="Mail-DefaultPortsDefaultports"><span class="confluence-anchor-link" id="Mail-DefaultPorts"></span>Default ports</h4><p>Default port numbers are supported. If the port number is omitted, Camel determines the port number to use based on the protocol.</p><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Protocol </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Port Number </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>SMTP</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>25</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>SMTPS</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>465</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>POP3</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>110</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>POP3S</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>995</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>IMAP</code> </p></td><td colspan="1" rowspan="1" class="confl
 uenceTd"><p> <code>143</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>IMAPS</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>993</code> </p></td></tr></tbody></table>
-</div>
-
-<h3 id="Mail-Options">Options</h3>
-<div class="confluenceTableSmall">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Property </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The host name or IP address to connect to. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>port</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> See <a shape="rect" href="#Mail-DefaultPorts">DefaultPorts</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The TCP port number to connect on. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td cols
 pan="1" rowspan="1" class="confluenceTd"><p> The user name on the email server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>password</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The password on the email server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ignoreUriScheme</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If <code>false</code>, Camel uses the scheme to determine the transport protocol (POP, IMAP, SMTP etc.) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>defaultEncoding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The default encoding to use for Mime Messages. </p></td></t
 r><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>contentType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>text/plain</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The mail message content type. Use <code>text/html</code> for HTML mails. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>folderName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>INBOX</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The folder to poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>destination</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>@deprecated</strong> Use the <code>to</code> option instead. The <code>TO</code> recipients (receivers of the email). </p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
 nceTd"><p> <code>to</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The TO recipients (the receivers of the mail). Separate multiple email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>replyTo</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>alias@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> As of <strong>Camel 2.8.4, 2.9.1+</strong>, the Reply-To recipients (the receivers of the response mail). Separate multiple email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CC</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate multiple email addresses with a comma. </p></t
 d></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>BCC</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The BCC recipients (the receivers of the mail). Separate multiple email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>from</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>camel@localhost</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The FROM email address. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>subject</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> As of <strong>Camel 2.3</strong>, the Subject of the message being sent. Note: Setting the subject in the header takes precedence over this option. </p></td></tr><tr><td colspan="1" rowspan="
 1" class="confluenceTd"><p> <code>peek</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.3/2.12.2:</strong> Consumer only. Will mark the <code>javax.mail.Message</code> as peeked before processing the mail message. This applies to <code>IMAPMessage</code> messages types only. By using peek the mail will not be eager marked as <code>SEEN</code> on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>delete</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Deletes the messages after they have been processed. This is done by setting the <code>DELETED</code> flag on the mail message. If <code>false</code>, the <code>SEEN</code> flag is set instead
 . As of <strong>Camel 2.10</strong> you can override this configuration option by setting a header with the key <code>delete</code> to determine if the mail should be deleted or not. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>unseen</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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 <code>true</code> will filter to only unseen messages.  POP3 does not support the <code>SEEN</code> flag, so this option is not supported in POP3; use IMAP instead. <strong>Important:</strong> This option is <strong>not</strong> in use if you also use <code>searchTerm</code> options. Instead if you want to disable unseen when using <code>searchTerm</code>'s then add <code>search
 Term.unseen=false</code> as a term. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>copyTo</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> Consumer only. After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key <code>copyTo</code>, allowing you to copy messages to folder names configured at runtime. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>fetchSize</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-1</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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 <code>-1</code> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>alternativeBodyHeader</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelMailAlternativeBody</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the key to an IN message header that contains an alternative email body. For example, if you send emails in <code>text/html</code> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>debugMode</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Enable debug mode on the underlying mail framework. The SUN Mail f
 ramework logs the debug messages to <code>System.out</code> by default. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>connectionTimeout</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>30000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The connection timeout in milliseconds. Default is 30 seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.initialDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Milliseconds before the polling starts. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.delay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>60000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Camel will poll the mailbox only once a minute by default to avoid overloading the mail
  server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.useFixedDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set to <code>true</code> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>disconnect</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8.3/2.9:</strong> Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluence
 Td"><p> <code>closeFolder</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10.4:</strong> Whether the consumer should close the folder after polling. Setting this option to <code>false</code> and having <code>disconnect=false</code> as well, then the consumer keep the folder open between polls. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>mail.XXX</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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: <code>mail.pop3.forgettopheaders=true</code>. You can set mu
 ltiple such options, for example: <code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>mapMailMessage</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> 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 <code>javax.mail.Message</code>. You can retrieve this raw message by calling <code>exchange.getIn().getBody(javax.mail.Message.class)</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxMessagesPerPoll</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>javaMailSender</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies a pluggable <code>org.springframework.mail.javamail.JavaMailSender</code> instance in order to use a custom email implementation. If none provided, Camel uses the default <code>org.springframework.mail.javamail.JavaMailSenderImpl</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ignoreUnsupportedCharset</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></t
 d><td colspan="1" rowspan="1" class="confluenceTd"><p> Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then <code>charset=XXX</code> (where <code>XXX</code> represents the unsupported charset) is removed from the <code>content-type</code> and it relies on the platform default instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>sslContextParameters</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> Reference to a <code>org.apache.camel.util.jsse.SSLContextParameters</code> 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-Usi
 ngtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>searchTerm</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. See further below for examples. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>searchTerm.xxx</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> To configure search terms directly from the endpoint uri, which supports a limited number of terms defined by the <code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See f
 urther below for examples. </p></td></tr></tbody></table>
-</div>
-
-<h3 id="Mail-SSLsupport">SSL support</h3>
-
-<p>The underlying mail framework is responsible for providing SSL support. &#160;You may either configure SSL/TLS support by completely specifying the necessary Java Mail API configuration options, or you may provide a configured SSLContextParameters through the component or endpoint configuration.</p>
-
-<h4 id="Mail-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</h4>
-
-<p>As of <strong>Camel 2.10</strong>, the mail component supports SSL/TLS configuration through the <a shape="rect" href="camel-configuration-utilities.html">Camel JSSE Configuration Utility</a>.&#160; This utility greatly decreases the amount of component specific code you need to write and is configurable at the endpoint and component levels.&#160; The following examples demonstrate how to use the utility with the mail component.</p>
-
-<h5 id="Mail-Programmaticconfigurationoftheendpoint">Programmatic configuration of the endpoint</h5>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-KeyStoreParameters ksp = new KeyStoreParameters();
+</div><h3 id="Mail-Options">Options</h3><div class="confluenceTableSmall">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Property </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The host name or IP address to connect to. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>port</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> See <a shape="rect" href="#Mail-DefaultPorts">DefaultPorts</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The TCP port number to connect on. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td cols
 pan="1" rowspan="1" class="confluenceTd"><p> The user name on the email server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>password</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The password on the email server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ignoreUriScheme</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If <code>false</code>, Camel uses the scheme to determine the transport protocol (POP, IMAP, SMTP etc.) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>contentType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>text/plain</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The mail message content type. Use <code>text/html</code>
  for HTML mails. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>folderName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>INBOX</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The folder to poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>destination</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>@deprecated</strong> Use the <code>to</code> option instead. The <code>TO</code> recipients (receivers of the email). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>to</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The TO recipients (the receivers of the mail). Separate multiple email addresses with a comma. </p></td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>replyTo</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>alias@host</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> As of <strong>Camel 2.8.4, 2.9.1+</strong>, the Reply-To recipients (the receivers of the response mail). Separate multiple email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CC</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate multiple email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>BCC</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The BCC recipients (the receivers of the mail). Separate multiple 
 email addresses with a comma. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>from</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>camel@localhost</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The FROM email address. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>subject</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> As of <strong>Camel 2.3</strong>, the Subject of the message being sent. Note: Setting the subject in the header takes precedence over this option. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>peek</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.3/2.12.2:</strong> Consumer only. Will mark the <code>javax.mail.Message</code> as
  peeked before processing the mail message. This applies to <code>IMAPMessage</code> messages types only. By using peek the mail will not be eager marked as <code>SEEN</code> on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>delete</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Deletes the messages after they have been processed. This is done by setting the <code>DELETED</code> flag on the mail message. If <code>false</code>, the <code>SEEN</code> flag is set instead. As of <strong>Camel 2.10</strong> you can override this configuration option by setting a header with the key <code>delete</code> to determine if the mail should be deleted or not. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>unseen</code> </p></td><td co
 lspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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 <code>true</code> will filter to only unseen messages.  POP3 does not support the <code>SEEN</code> flag, so this option is not supported in POP3; use IMAP instead. <strong>Important:</strong> This option is <strong>not</strong> in use if you also use <code>searchTerm</code> options. Instead if you want to disable unseen when using <code>searchTerm</code>'s then add <code>searchTerm.unseen=false</code> as a term. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>copyTo</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:<
 /strong> Consumer only. After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key <code>copyTo</code>, allowing you to copy messages to folder names configured at runtime. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>fetchSize</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-1</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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 <code>-1</code> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>alternativeBodyHeader</code> </p></td><td colspan="1" rowspan="1
 " class="confluenceTd"><p> <code>CamelMailAlternativeBody</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the key to an IN message header that contains an alternative email body. For example, if you send emails in <code>text/html</code> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>debugMode</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug messages to <code>System.out</code> by default. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>connectionTimeout</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>30000</code> </p></td><td colspan="1" rowspan="
 1" class="confluenceTd"><p> The connection timeout in milliseconds. Default is 30 seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.initialDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Milliseconds before the polling starts. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.delay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>60000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Camel will poll the mailbox only once a minute by default to avoid overloading the mail server. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>consumer.useFixedDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set to <code>true</code> to us
 e 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>disconnect</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8.3/2.9:</strong> Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>closeFolder</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10.4:</strong> Whether the consumer should close the folder after polling. Setting this option to 
 <code>false</code> and having <code>disconnect=false</code> as well, then the consumer keep the folder open between polls. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>mail.XXX</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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: <code>mail.pop3.forgettopheaders=true</code>. You can set multiple such options, for example: <code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>mapMailMessage</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</co
 de> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> 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 <code>javax.mail.Message</code>. You can retrieve this raw message by calling <code>exchange.getIn().getBody(javax.mail.Message.class)</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxMessagesPerPoll</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>javaMailSender</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies a pluggable <code>org.springframework.mail.javamail.JavaMailSender</code> instance in order to use a custom email implementation. If none provided, Camel uses the default <code>org.springframework.mail.javamail.JavaMailSenderImpl</code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>ignoreUnsupportedCharset</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then <code>charset=XXX</code> (where <code>XXX</code> represents the unsupported charset) is removed from the <code>cont
 ent-type</code> and it relies on the platform default instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>sslContextParameters</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> Reference to a <code>org.apache.camel.util.jsse.SSLContextParameters</code> 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>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>searchTerm</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" clas
 s="confluenceTd"><p> <strong>Camel 2.11:</strong> Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. See further below for examples. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>searchTerm.xxx</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> To configure search terms directly from the endpoint uri, which supports a limited number of terms defined by the <code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See further below for examples. </p></td></tr></tbody></table>
+</div><h3 id="Mail-SSLsupport">SSL support</h3><p>The underlying mail framework is responsible for providing SSL support. &#160;You may either configure SSL/TLS support by completely specifying the necessary Java Mail API configuration options, or you may provide a configured SSLContextParameters through the component or endpoint configuration.</p><h4 id="Mail-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</h4><p>As of <strong>Camel 2.10</strong>, the mail component supports SSL/TLS configuration through the <a shape="rect" href="camel-configuration-utilities.html">Camel JSSE Configuration Utility</a>.&#160; This utility greatly decreases the amount of component specific code you need to write and is configurable at the endpoint and component levels.&#160; The following examples demonstrate how to use the utility with the mail component.</p><h5 id="Mail-Programmaticconfigurationoftheendpoint">Programmatic configuration of the endpoint</h5><div class="code pan
 el pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new KeyStoreParameters();
 ksp.setResource(&quot;/users/home/server/truststore.jks&quot;);
 ksp.setPassword(&quot;keystorePassword&quot;);
 TrustManagersParameters tmp = new TrustManagersParameters();
@@ -219,12 +152,8 @@ registry.bind(&quot;sslContextParameters
 from(...)
 &amp;nbsp; &amp;nbsp; .to(&quot;smtps://smtp.google.com?username=user@gmail.com&amp;password=password&amp;sslContextParameters=#sslContextParameters&quot;);
 ]]></script>
-</div></div>
-
-<h5 id="Mail-SpringDSLbasedconfigurationofendpoint">Spring DSL based configuration of endpoint</h5>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-...
+</div></div><h5 id="Mail-SpringDSLbasedconfigurationofendpoint">Spring DSL based configuration of endpoint</h5><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[...
 &lt;camel:sslContextParameters id=&quot;sslContextParameters&quot;&gt;
   &lt;camel:trustManagers&gt;
     &lt;camel:keyStore resource=&quot;/users/home/server/truststore.jks&quot; password=&quot;keystorePassword&quot;/&gt;
@@ -233,27 +162,11 @@ from(...)
 ...
 &lt;to uri=&quot;smtps://smtp.google.com?username=user@gmail.com&amp;password=password&amp;sslContextParameters=#sslContextParameters&quot;/&gt;...
 ]]></script>
-</div></div>
-
-<h4 id="Mail-ConfiguringJavaMailDirectly">Configuring JavaMail Directly</h4>
-
-<p>Camel uses SUN JavaMail, which only trusts certificates issued by well known Certificate Authorities (the default JVM trust configuration).  If you issue your own certificates, you have to import the CA certificates into the JVM's Java trust/key store files, override the default JVM trust/key store files (see <code>SSLNOTES.txt</code> in JavaMail for details).</p>
-
-<h3 id="Mail-MailMessageContent">Mail Message Content</h3>
-
-<p>Camel uses the message exchange's IN body as the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> text content. The body is converted to <code>String.class</code>.</p>
-
-<p>Camel copies all of the exchange's IN headers to the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> headers.</p>
-
-<p>The subject of the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> can be configured using a header property on the IN message. The code below demonstrates this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="Mail-ConfiguringJavaMailDirectly">Configuring JavaMail Directly</h4><p>Camel uses SUN JavaMail, which only trusts certificates issued by well known Certificate Authorities (the default JVM trust configuration). If you issue your own certificates, you have to import the CA certificates into the JVM's Java trust/key store files, override the default JVM trust/key store files (see <code>SSLNOTES.txt</code> in JavaMail for details).</p><h3 id="Mail-MailMessageContent">Mail Message Content</h3><p>Camel uses the message exchange's IN body as the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> text content. The body is converted to <code>String.class</code>.</p><p>Camel copies all of the exchange's IN headers to the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> head
 ers.</p><p>The subject of the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> can be configured using a header property on the IN message. The code below demonstrates this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:a&quot;).setHeader(&quot;subject&quot;, constant(subject)).to(&quot;smtp://james2@localhost&quot;);
 ]]></script>
-</div></div>
-
-<p>The same applies for other MimeMessage headers such as recipients, so you can use a header property as <code>To</code>:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The same applies for other MimeMessage headers such as recipients, so you can use a header property as <code>To</code>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 Map&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;();
 map.put(&quot;To&quot;, &quot;davsclaus@apache.org&quot;);
@@ -263,82 +176,31 @@ map.put(&quot;Subject&quot;, &quot;Camel
 String body = &quot;Hello Claus.\nYes it does.\n\nRegards James.&quot;;
 template.sendBodyAndHeaders(&quot;smtp://davsclaus@apache.org&quot;, body, map);
 ]]></script>
-</div></div>
-
-<p><strong>Since Camel 2.11</strong> When using the MailProducer the send the mail to server, you should be able to get the message id of the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> with the key <code>CamelMailMessageId</code> from the Camel message header.</p>
-
-<h3 id="Mail-Headerstakeprecedenceoverpre-configuredrecipients">Headers take precedence over pre-configured recipients</h3>
-
-<p>The recipients specified in the message headers always take precedence over recipients pre-configured in the endpoint URI. The idea is that if you provide any recipients in the message headers, that is what you get. The recipients pre-configured in the endpoint URI are treated as a fallback.</p>
-
-<p>In the sample code below, the email message is sent to <code>davsclaus@apache.org</code>, because it takes precedence over the pre-configured recipient, <code>info@mycompany.com</code>. Any <code>CC</code> and <code>BCC</code> settings in the endpoint URI are also ignored and those recipients will not receive any mail. The choice between headers and pre-configured settings is all or nothing: the mail component <em>either</em> takes the recipients exclusively from the headers or exclusively from the pre-configured settings. It is not possible to mix and match headers and pre-configured settings.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-        Map&lt;String, Object&gt; headers = new HashMap&lt;String, Object&gt;();
+</div></div><p><strong>Since Camel 2.11</strong> When using the MailProducer the send the mail to server, you should be able to get the message id of the <a shape="rect" class="external-link" href="http://java.sun.com/javaee/5/docs/api/javax/mail/internet/MimeMessage.html" rel="nofollow">MimeMessage</a> with the key <code>CamelMailMessageId</code> from the Camel message header.</p><h3 id="Mail-Headerstakeprecedenceoverpre-configuredrecipients">Headers take precedence over pre-configured recipients</h3><p>The recipients specified in the message headers always take precedence over recipients pre-configured in the endpoint URI. The idea is that if you provide any recipients in the message headers, that is what you get. The recipients pre-configured in the endpoint URI are treated as a fallback.</p><p>In the sample code below, the email message is sent to <code>davsclaus@apache.org</code>, because it takes precedence over the pre-configured recipient, <code>info@mycompany.com</code>. An
 y <code>CC</code> and <code>BCC</code> settings in the endpoint URI are also ignored and those recipients will not receive any mail. The choice between headers and pre-configured settings is all or nothing: the mail component <em>either</em> takes the recipients exclusively from the headers or exclusively from the pre-configured settings. It is not possible to mix and match headers and pre-configured settings.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[        Map&lt;String, Object&gt; headers = new HashMap&lt;String, Object&gt;();
         headers.put(&quot;to&quot;, &quot;davsclaus@apache.org&quot;);
 
         template.sendBodyAndHeaders(&quot;smtp://admin@localhost?to=info@mycompany.com&quot;, &quot;Hello World&quot;, headers);
 ]]></script>
-</div></div>
-
-<h3 id="Mail-Multiplerecipientsforeasierconfiguration">Multiple recipients for easier configuration</h3>
-
-<p>It is possible to set multiple recipients using a comma-separated or a semicolon-separated list. This applies both to header settings and to settings in an endpoint URI. For example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-        Map&lt;String, Object&gt; headers = new HashMap&lt;String, Object&gt;();
+</div></div><h3 id="Mail-Multiplerecipientsforeasierconfiguration">Multiple recipients for easier configuration</h3><p>It is possible to set multiple recipients using a comma-separated or a semicolon-separated list. This applies both to header settings and to settings in an endpoint URI. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[        Map&lt;String, Object&gt; headers = new HashMap&lt;String, Object&gt;();
         headers.put(&quot;to&quot;, &quot;davsclaus@apache.org ; jstrachan@apache.org ; ningjiang@apache.org&quot;);
 ]]></script>
-</div></div>
-
-<p>The preceding example uses a semicolon, <code>;</code>, as the separator character.</p>
-
-<h3 id="Mail-Settingsendernameandemail">Setting sender name and email</h3>
-
-<p>You can specify recipients in the format, <code>name &lt;email&gt;</code>, to include both the name and the email address of the recipient.</p>
-
-<p>For example, you define the following headers on the a <a shape="rect" href="message.html">Message</a>:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-Map headers = new HashMap();
+</div></div><p>The preceding example uses a semicolon, <code>;</code>, as the separator character.</p><h3 id="Mail-Settingsendernameandemail">Setting sender name and email</h3><p>You can specify recipients in the format, <code>name &lt;email&gt;</code>, to include both the name and the email address of the recipient.</p><p>For example, you define the following headers on the a <a shape="rect" href="message.html">Message</a>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Map headers = new HashMap();
 map.put(&quot;To&quot;, &quot;Claus Ibsen &lt;davsclaus@apache.org&gt;&quot;);
 map.put(&quot;From&quot;, &quot;James Strachan &lt;jstrachan@apache.org&gt;&quot;);
 map.put(&quot;Subject&quot;, &quot;Camel is cool&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="Mail-SUNJavaMail">SUN JavaMail</h3>
-
-<p><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/" rel="nofollow">SUN JavaMail</a> is used under the hood for consuming and producing mails.<br clear="none">
-We encourage end-users to consult these references when using either POP3 or IMAP protocol. Note particularly that POP3 has a much more limited set of features than IMAP.</p>
-<ul class="alternate"><li><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/package-summary.html" rel="nofollow">SUN POP3 API</a></li><li><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/package-summary.html" rel="nofollow">SUN IMAP API</a></li><li>And generally about the <a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/javax/mail/Flags.html" rel="nofollow">MAIL Flags</a></li></ul>
-
-
-<h3 id="Mail-Samples">Samples</h3>
-
-<p>We start with a simple route that sends the messages received from a JMS queue as emails. The email account is the <code>admin</code> account on <code>mymailserver.com</code>.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;jms://queue:subscription&quot;).to(&quot;smtp://admin@mymailserver.com?password=secret&quot;);
+</div></div><h3 id="Mail-SUNJavaMail">SUN JavaMail</h3><p><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/" rel="nofollow">SUN JavaMail</a> is used under the hood for consuming and producing mails.<br clear="none"> We encourage end-users to consult these references when using either POP3 or IMAP protocol. Note particularly that POP3 has a much more limited set of features than IMAP.</p><ul class="alternate"><li><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/package-summary.html" rel="nofollow">SUN POP3 API</a></li><li><a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/package-summary.html" rel="nofollow">SUN IMAP API</a></li><li>And generally about the <a shape="rect" class="external-link" href="http://java.sun.com/products/javamail/javadocs/javax/mail/Flags.html" rel="nofollow">MAIL Flags</a></li></ul><h3 id="Mail-Samples">Samples
 </h3><p>We start with a simple route that sends the messages received from a JMS queue as emails. The email account is the <code>admin</code> account on <code>mymailserver.com</code>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;jms://queue:subscription&quot;).to(&quot;smtp://admin@mymailserver.com?password=secret&quot;);
 ]]></script>
-</div></div>
-
-<p>In the next sample, we poll a mailbox for new emails once every minute. Notice that we use the special <code>consumer</code> option for setting the poll interval, <code>consumer.delay</code>, as 60000 milliseconds = 60 seconds.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;imap://admin@mymailserver.com
+</div></div><p>In the next sample, we poll a mailbox for new emails once every minute. Notice that we use the special <code>consumer</code> option for setting the poll interval, <code>consumer.delay</code>, as 60000 milliseconds = 60 seconds.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;imap://admin@mymailserver.com
      password=secret&amp;unseen=true&amp;consumer.delay=60000&quot;)
     .to(&quot;seda://mails&quot;);
 ]]></script>
-</div></div>
-
-<p>In this sample we want to send a mail to multiple recipients: </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In this sample we want to send a mail to multiple recipients:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 // all the recipients of this mail are:
 // To: camel@riders.org , easy@riders.org
@@ -348,22 +210,14 @@ String recipients = &quot;&amp;To=camel@
 
 from(&quot;direct:a&quot;).to(&quot;smtp://you@mymailserver.com?password=secret&amp;From=you@apache.org&quot; + recipients);
 ]]></script>
-</div></div>
-
-<h3 id="Mail-Sendingmailwithattachmentsample">Sending mail with attachment sample</h3>
-
-    <div class="aui-message problem shadowed information-macro">
+</div></div><h3 id="Mail-Sendingmailwithattachmentsample">Sending mail with attachment sample</h3>    <div class="aui-message problem shadowed information-macro">
                     <p class="title">Attachments are not support by all Camel components</p>
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>The <em>Attachments API</em> is based on the Java Activation Framework and is generally only used by the Mail API. Since many of the other Camel components do not support attachments, the attachments could potentially be lost as they propagate along the route. The rule of thumb, therefore, is to add attachments just before sending a message to the mail endpoint.</p>
+                            <p>The <em>Attachments API</em> is based on the Java Activation Framework and is generally only used by the Mail API. Since many of the other Camel components do not support attachments, the attachments could potentially be lost as they propagate along the route. The rule of thumb, therefore, is to add attachments just before sending a message to the mail endpoint.</p>
                     </div>
     </div>
-
-
-<p>The mail component supports attachments. In the sample below, we send a mail message containing a plain text message with a logo file attachment.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>The mail component supports attachments. In the sample below, we send a mail message containing a plain text message with a logo file attachment.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 
 // create an exchange with a normal body and attachment to be produced as email
@@ -383,46 +237,23 @@ producer.start();
 producer.process(exchange);
 
 ]]></script>
-</div></div>
-
-<h3 id="Mail-SSLsample">SSL sample</h3>
-
-<p>In this sample, we want to poll our Google mail inbox for mails. To download mail onto a local mail client, Google mail requires you to enable and configure SSL. This is done by logging into your Google mail account and changing your settings to allow IMAP access. Google have extensive documentation on how to do this.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;imaps://imap.gmail.com?username=YOUR_USERNAME@gmail.com&amp;password=YOUR_PASSWORD&quot;
+</div></div><h3 id="Mail-SSLsample">SSL sample</h3><p>In this sample, we want to poll our Google mail inbox for mails. To download mail onto a local mail client, Google mail requires you to enable and configure SSL. This is done by logging into your Google mail account and changing your settings to allow IMAP access. Google have extensive documentation on how to do this.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;imaps://imap.gmail.com?username=YOUR_USERNAME@gmail.com&amp;password=YOUR_PASSWORD&quot;
     + &quot;&amp;delete=false&amp;unseen=true&amp;consumer.delay=60000&quot;).to(&quot;log:newmail&quot;);
 ]]></script>
-</div></div>
-
-<p>The preceding route polls the Google mail inbox for new mails once every minute and logs the received messages to the <code>newmail</code> logger category.<br clear="none">
-Running the sample with <code>DEBUG</code> logging enabled, we can monitor the progress in the logs:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-2008-05-08 06:32:09,640 DEBUG MailConsumer - Connecting to MailStore imaps//imap.gmail.com:993 (SSL enabled), folder=INBOX
+</div></div><p>The preceding route polls the Google mail inbox for new mails once every minute and logs the received messages to the <code>newmail</code> logger category.<br clear="none"> Running the sample with <code>DEBUG</code> logging enabled, we can monitor the progress in the logs:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[2008-05-08 06:32:09,640 DEBUG MailConsumer - Connecting to MailStore imaps//imap.gmail.com:993 (SSL enabled), folder=INBOX
 2008-05-08 06:32:11,203 DEBUG MailConsumer - Polling mailfolder: imaps//imap.gmail.com:993 (SSL enabled), folder=INBOX
 2008-05-08 06:32:11,640 DEBUG MailConsumer - Fetching 1 messages. Total 1 messages.
 2008-05-08 06:32:12,171 DEBUG MailConsumer - Processing message: messageNumber=[332], from=[James Bond &lt;007@mi5.co.uk&gt;], to=YOUR_USERNAME@gmail.com], subject=[...
 2008-05-08 06:32:12,187 INFO  newmail - Exchange[MailMessage: messageNumber=[332], from=[James Bond &lt;007@mi5.co.uk&gt;], to=YOUR_USERNAME@gmail.com], subject=[...
 ]]></script>
-</div></div>
-
-<h3 id="Mail-Consumingmailswithattachmentsample">Consuming mails with attachment sample</h3>
-
-<p>In this sample we poll a mailbox and store all attachments from the mails as files. First, we define a route to poll the mailbox. As this sample is based on google mail, it uses the same route as shown in the SSL sample:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;imaps://imap.gmail.com?username=YOUR_USERNAME@gmail.com&amp;password=YOUR_PASSWORD&quot;
+</div></div><h3 id="Mail-Consumingmailswithattachmentsample">Consuming mails with attachment sample</h3><p>In this sample we poll a mailbox and store all attachments from the mails as files. First, we define a route to poll the mailbox. As this sample is based on google mail, it uses the same route as shown in the SSL sample:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;imaps://imap.gmail.com?username=YOUR_USERNAME@gmail.com&amp;password=YOUR_PASSWORD&quot;
     + &quot;&amp;delete=false&amp;unseen=true&amp;consumer.delay=60000&quot;).process(new MyMailProcessor());
 ]]></script>
-</div></div>
-
-<p>Instead of logging the mail we use a processor where we can process the mail from java code:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    public void process(Exchange exchange) throws Exception {
+</div></div><p>Instead of logging the mail we use a processor where we can process the mail from java code:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    public void process(Exchange exchange) throws Exception {
         // the API is a bit clunky so we need to loop
         Map&lt;String, DataHandler&gt; attachments = exchange.getIn().getAttachments();
         if (attachments.size() &gt; 0) {
@@ -444,17 +275,7 @@ from(&quot;imaps://imap.gmail.com?userna
         }
    }
 ]]></script>
-</div></div>
-<p>As you can see the API to handle attachments is a bit clunky but it's there so you can get the <code>javax.activation.DataHandler</code> so you can handle the attachments using standard API.</p>
-
-<h3 id="Mail-Howtosplitamailmessagewithattachments">How to split a mail message with attachments</h3>
-
-<p>In this example we consume mail messages which may have a number of attachments. What we want to do is to use the <a shape="rect" href="splitter.html">Splitter</a> EIP per individual attachment, to process the attachments separately. For example if the mail message has 5 attachments, we want the <a shape="rect" href="splitter.html">Splitter</a> to process five messages, each having a single attachment. To do this we need to provide a custom <a shape="rect" href="expression.html">Expression</a> to the <a shape="rect" href="splitter.html">Splitter</a> where we provide a List&lt;Message&gt; that contains the five messages with the single attachment.</p>
-
-<p>The code is provided out of the box in Camel 2.10 onwards in the <code>camel-mail</code> component. The code is in the class: <code>org.apache.camel.component.mail.SplitAttachmentsExpression</code>, which you can find the source code <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/SplitAttachmentsExpression.java">here</a></p>
-
-<p>In the Camel route you then need to use this <a shape="rect" href="expression.html">Expression</a> in the route as shown below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>As you can see the API to handle attachments is a bit clunky but it's there so you can get the <code>javax.activation.DataHandler</code> so you can handle the attachments using standard API.</p><h3 id="Mail-Howtosplitamailmessagewithattachments">How to split a mail message with attachments</h3><p>In this example we consume mail messages which may have a number of attachments. What we want to do is to use the <a shape="rect" href="splitter.html">Splitter</a> EIP per individual attachment, to process the attachments separately. For example if the mail message has 5 attachments, we want the <a shape="rect" href="splitter.html">Splitter</a> to process five messages, each having a single attachment. To do this we need to provide a custom <a shape="rect" href="expression.html">Expression</a> to the <a shape="rect" href="splitter.html">Splitter</a> where we provide a List&lt;Message&gt; that contains the five messages with the single attachment.</p><p>The code is provided ou
 t of the box in Camel 2.10 onwards in the <code>camel-mail</code> component. The code is in the class: <code>org.apache.camel.component.mail.SplitAttachmentsExpression</code>, which you can find the source code <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/SplitAttachmentsExpression.java">here</a></p><p>In the Camel route you then need to use this <a shape="rect" href="expression.html">Expression</a> in the route as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 from(&quot;pop3://james@mymailserver.com?password=secret&amp;consumer.delay=1000&quot;)
     .to(&quot;log:email&quot;)
@@ -464,88 +285,47 @@ from(&quot;pop3://james@mymailserver.com
         .to(&quot;mock:split&quot;)
     .end();
 ]]></script>
-</div></div>
-
-<p>If you use XML DSL then you need to declare a method call expression in the <a shape="rect" href="splitter.html">Splitter</a> as shown below</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;split&gt;
+</div></div><p>If you use XML DSL then you need to declare a method call expression in the <a shape="rect" href="splitter.html">Splitter</a> as shown below</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;split&gt;
   &lt;method beanType=&quot;org.apache.camel.component.mail.SplitAttachmentsExpression&quot;/&gt;
   &lt;to uri=&quot;mock:split&quot;/&gt;
 &lt;/split&gt;
 ]]></script>
-</div></div>
-
-
-<h3 id="Mail-UsingcustomSearchTerm">Using custom SearchTerm</h3>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>You can configure a <code>searchTerm</code> on the <code>MailEndpoint</code> 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 pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><h3 id="Mail-UsingcustomSearchTerm">Using custom SearchTerm</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can configure a <code>searchTerm</code> on the <code>MailEndpoint</code> 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 pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm.subjectOrBody=Camel&quot;/&gt;
   &lt;to uri=&quot;bean:myBean&quot;/&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>Notice we use the <code>"searchTerm.subjectOrBody"</code> 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 <code>org.apache.camel.component.mail.SimpleSearchTerm</code> has a number of options you can configure:</p>
-
-<p>Or to get the new unseen emails going 24 hours back in time you can do. Notice the "now-24h" syntax. See the table below for more details.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>Notice we use the <code>"searchTerm.subjectOrBody"</code> 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 <code>org.apache.camel.component.mail.SimpleSearchTerm</code> has a number of options you can configure:</p><p>Or to get the new unseen emails going 24 hours back in time you can do. Notice the "now-24h" syntax. See the table below for more details.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm.fromSentDate=now-24h&quot;/&gt;
   &lt;to uri=&quot;bean:myBean&quot;/&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>You can have multiple searchTerm in the endpoint uri configuration. They would then be combined together using AND operator, eg so both conditions must match. For example to get the last unseen emails going back 24 hours which has Camel in the mail subject you can do: </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>You can have multiple searchTerm in the endpoint uri configuration. They would then be combined together using AND operator, eg so both conditions must match. For example to get the last unseen emails going back 24 hours which has Camel in the mail subject you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm.subject=Camel&amp;searchTerm.fromSentDate=now-24h&quot;/&gt;
   &lt;to uri=&quot;bean:myBean&quot;/&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-
-<div class="confluenceTableSmall">
+</div></div><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> unseen </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to limit by unseen mails only. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> subjectOrBody </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To limit by subject or body to contain the word. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> subject </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"
 ><p> The subject must contain the word. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> body </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The body must contain the word. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> from </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The mail must be from a given email pattern. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> to </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The mail must be to a given email pattern. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> fromSentDate </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p> The mail must be sent after or equals (GE) a given date. The date pattern is <code>yyyy-MM-dd HH:mm:SS</code>, eg use <code>"2012-01-01 00:00:00"</code> to be from the year 2012 onwards. You can use <code>"now"</code> for current timestamp. The "now" syntax supports an optional offset, that can be specified as either + or - with a numeric value. For example for last 24 hours, you can use <code>"now - 24h"</code> or without spaces <code>"now-24h"</code>. Notice that Camel supports shorthands for hours, minutes, and seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> toSentDate </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The mail must be sent before or equals (BE) a given date. The date pattern is <code>yyyy-MM-dd HH:mm:SS</code>, eg use <code>"2012-01-01 00:00:00"</code> to be before the year 2012. You can use <code>"no
 w"</code> for current timestamp. The "now" syntax supports an optional offset, that can be specified as either + or - with a numeric value. For example for last 24 hours, you can use <code>"now - 24h"</code> or without spaces <code>"now-24h"</code>. Notice that Camel supports shorthands for hours, minutes, and seconds. </p></td></tr></tbody></table>
-</div>
-
-<p>The <code>SimpleSearchTerm</code> 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 pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;bean id=&quot;mySearchTerm&quot; class=&quot;org.apache.camel.component.mail.SimpleSearchTerm&quot;&gt;
+</div><p>The <code>SimpleSearchTerm</code> 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 pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;mySearchTerm&quot; class=&quot;org.apache.camel.component.mail.SimpleSearchTerm&quot;&gt;
   &lt;property name=&quot;subject&quot; value=&quot;Order&quot;/&gt;
   &lt;property name=&quot;to&quot; value=&quot;acme-order@acme.com&quot;/&gt;
   &lt;property name=&quot;fromSentDate&quot; value=&quot;now&quot;/&gt;
  &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>You can then refer to this bean, using #beanId in your Camel route as shown:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>You can then refer to this bean, using #beanId in your Camel route as shown:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;imaps://mymailseerver?username=foo&amp;password=secret&amp;searchTerm=#mySearchTerm&quot;/&gt;
   &lt;to uri=&quot;bean:myBean&quot;/&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>In Java there is a builder class to build compound <code>SearchTerm}}s using the {{org.apache.camel.component.mail.SearchTermBuilder</code> class.<br clear="none">
-This allows you to build complex terms such as:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-// we just want the unseen mails which is not spam
+</div></div><p>In Java there is a builder class to build compound <code>SearchTerm}}s using the {{org.apache.camel.component.mail.SearchTermBuilder</code> class.<br clear="none"> This allows you to build complex terms such as:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[// we just want the unseen mails which is not spam
 SearchTermBuilder builder = new SearchTermBuilder();
 
 builder.unseen().body(Op.not, &quot;Spam&quot;).subject(Op.not, &quot;Spam&quot;)
@@ -555,9 +335,7 @@ builder.unseen().body(Op.not, &quot;Spam
 
 SearchTerm term = builder.build();
 ]]></script>
-</div></div>
-
-<h3 id="Mail-SeeAlso">See Also</h3>
+</div></div><p></p><h3 id="Mail-SeeAlso">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul></div>
         </td>
         <td valign="top">